Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
in my code, i have used ajax to pass file from view to controller. But i can't use" request.file", help me, please. Thanks View $('.submit').click(function() {
$.ajax({ type: "POST", url: "/umbraco/api/SignUp/UploadAnh", data: formData, datatype: "Json", success: function() { } }); });
controller
[HttpPost] public ActionResult UploadAnh() { try { foreach (var ifile in Request.Files) { // } } catch (Exception) { return null; } return new RedirectToUmbracoPageResult(1325); }
I'm not totally sure but you might want to try this:
foreach (var ifile in HttpContext.Current.Request.Files) { // }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Request.Files does not exist when I inherit an UmbracoApiController
in my code, i have used ajax to pass file from view to controller. But i can't use" request.file", help me, please. Thanks View $('.submit').click(function() {
controller
I'm not totally sure but you might want to try this:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.