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

FineUploader data

$
0
0

Hi Community. I apologize in advance if this is a repeat question, but I've been searching around and haven't been able to find any answers.

I'm trying to get write Controller (in asp.net core) code to handle my fineuploader requests but it keeps failing to see the request data. Here is my uploader config in the view page:

<div> <div>
var uploader = new qq.FineUploader({
            element: document.getElementById("uploader"),
            request: {
                endpoint: '@Url.Action("AddAttachment", "Util")',
                customHeaders: {"RequestVerificationToken": '@GetAntiXsrfRequestToken()',"Content-Type": 'application/json'
                }
            },

And here is my controller code - not alot for now, I just literally want to see some data getting sent.</div> <div></div> <div>
public JsonResult AddAttachment([FromForm] Object o){
         //var x = HttpContext.Request;
         //return Json(x);
         if(o == null){
             return Json("no data");
         }else{
             return Json(o);
         }
    }

and her is what I see fineuploader sending to the server via the network tab in the chrome devtools:</div> <div></div> <div>
------WebKitFormBoundarySQwYoYovQOkoFU1f
Content-Disposition: form-data; name="test"

876
------WebKitFormBoundarySQwYoYovQOkoFU1f
Content-Disposition: form-data; name="qquuid"

9ba04b80-b3d8-4e2d-8068-792dd77253bd
------WebKitFormBoundarySQwYoYovQOkoFU1f
Content-Disposition: form-data; name="qqfilename"

dohPlayDat.PNG
------WebKitFormBoundarySQwYoYovQOkoFU1f
Content-Disposition: form-data; name="qqtotalfilesize"

3535659
------WebKitFormBoundarySQwYoYovQOkoFU1f
Content-Disposition: form-data; name="qqfile"; filename="dohPlayDat.PNG"
Content-Type: image/png


------WebKitFormBoundarySQwYoYovQOkoFU1f-
Any help at all will be greatly appreciated</div> <div></div> </div>

Viewing all articles
Browse latest Browse all 9386

Trending Articles



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