Upload file using WebApi, ajax

后端 未结 6 1178
深忆病人
深忆病人 2020-12-06 02:39

I want to upload file using a WebApi by making an ajax call and the file will save into database. I tried the code given in the this link. Here, it is saved the received da

6条回答
  •  我在风中等你
    2020-12-06 03:25

    I think what you want to achieve here is partly answered in this previous question

    Now, about saving directly to database, you should be able to achieve this without saving the file to a hard drive first, normally by taking the stream byte array and putting it into your database entity or row property as a byte[] (array of bytes)

提交回复
热议问题