Nov 23, 2017 07:22 AM|Brando ZWZ|LINK
Why do I want to do this? I want to save the file into the database and I can't save directly an IFormFile into a database. Therefore I have to open a stream and copy it into an MemoryStream. Then I have to convert it into a byte array. The steps are described
here and involve too much copying for my taste.
According to your description, I suggest you could read the file content in the client side as byte, then convert the file content and other arguments as a poco model.
Then you could send this poco model(as json) to the server side.
At last, in the server side, you could use poco model to CRUD.
Note: you need firstly convert the string to byte array, the store the data into database.