Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

HttpPost Ajax CALL and Controllers method in ASP.NET CORE

$
0
0

Dear Sirs.

Plese help me again on HttpPost

I have AJAX Call

fileChunk = new FormData();
fileChunk.append('fileSlice', uploader.file.slice(start, end));


posturl = '/MyController/UploadBlock/' + incrimentalIdentifier;

jqxhr = $.ajax({
async: true,
url: posturl,
data: fileChunk,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
type: 'POST',
error: function (request, error) {...},
success: function (notice) { ... }
});

----------
And Controller Method
[HttpPost("{id:int}")]
public async Task<IActionResult> UploadBlock([FromRoute] int id)

...

But Call does not gos to my Method I have 404 error

Please help me to fix issue


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>