I'm refering a folder containg a file to upload in DB. and i'm struggling with the right syntax.
I'm uploading a file in upload method, and then saving it's location in DB. At the moment i´m saving the whole folder in DB, instead of the uploaded file. How could i change this property?
model.FileContent = Encoding.ASCII.GetBytes(Server.MapPath(@"~/TargetFiles")); //fileBytes
Harlem 98Posted Dec 10, 2021, 9:13 AM
Sachin SinghPosted Dec 10, 2021, 6:22 AM
Srinivasan RamamoorthiPosted Dec 10, 2021, 5:03 AM
Check this link
https://www.c-sharpcorner.com/article/upload-files-and-save-into-database-in-binary-format-using-asp-net/