RoboticOperatingBuddy
Add a file upload to an ASP.NET project
Hi, I've kind of messed up and mistook a deadline on a project for anther, and suddenly found myself very behind on work, and I will need some help.
We have a web store project which lets you add products as a seller and then buy them as a buyer. This works fine, but we want to add pictures of the products aswell.
This is in our controller:
This is our model:
Now, I'm somewhat sure
PictureId
will not be good enough in this case? I would either need picture data itself in order to throw a data:image
sort of thing into the page, or a path to the picture.
I am attempting to follow https://learn.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-6.0#upload-small-files-with-buffered-model-binding-to-a-database, but as with most Microsoft guides, I sadly find it too technical to really follow. I get lost easily with what part of the code is what '^^7 replies