Thank you. But now my file uploads locally but nothing performs on hosting...
asp.net core 5 how to get .gif from input file using XmlHttpRequest()
Cycler
21
Reputation points
Hi, guys!
Could anyone help me with this issue? I am still having trouble when IFormFile is always null. Thank you.
2 answers
Sort by: Newest
-
-
P a u l 10,406 Reputation points
2021-10-16T23:15:02.963+00:00 It seems to work for me - this is from my view:
https://pastebin.com/raw/t2gqs0PR(had to use PB because including it here caused the request to be blocked)
Here's from the HomeController:
[HttpPost] public IActionResult Upload(IFormFile file) { return Content("done"); }
Here's a breakpoint in that method:
This is a fresh sample ASP.NET Core MVC project - is this roughly what your code looks like?