blazororchardcms

how to insert a file into orchard core media field using asp net core


I'm trying to write my own UI and use orchard core as backend. I have a content type which has a media field to get people resume. If I use orchard core and create a new content item every thing is fine. Here is the question. how can I send file from my own UI? I'm using blazorise thanks in advance


Solution

  • I Solved it. we shoud convert the file into byte[] and then create a stream and then inject IMediaFileStore and use CreateFileFromStreamAsync