Saturday 15 March 2014

javascript - jQuery file uploader just sending one chunk -


I am using the jQuery file uploader in my Django application.

I have a problem that Jenzo just gets a part of my big file before I thought it might be an issue with my UploadFileHandler , but when I clicked < Code> chunksend log in the event, it is only once (9 times in my case).

Any idea why the uploader is sending just one part?

Here's my code:

  $ ('# fileupload'). Fileupload ({DataType: 'json', Max Chunk Size: 10000000, Add: Function (E, Data) {console.log (data); var UploadRarrow = $ ('# Upload-Item-Master') .clone () .removeAttr ('Id') .appendTo ("#Upload-Container") .hide (). FadeIn (1000); UploadRao.Find ('.name') .text (data.file [0] .name); var jqXHR = Submit data (all) (work (results, textstats, jxxhr) {if (result.status == 201) {uploadRow.find ('progress bar.') CSS ('width', '100%'); UploadRao ('Progress'). RemoveClass ('active');} and {uploadRow.find ('progress bar'). CSS ('width', '100%') ; UploadRow.Find ('Progress') .removeClass ('Progress-Success'); uploadRow.find ('Progress'). RemoveClass ('Progress-Success'); uploadRow.find ('Progress') addClass (. Progress-hazard ');}}), runencend: function (e, data) {console.log ("chuck sent");}, progress: function (e, data) {var progress = pars (data. Load / data Cotat * 100, 10);}});    

The solution is that the plugin is JSON okay, Everything else will be considered bad and the next part will not be sent.

  Returns HTTPPRPS section (Jason Dendamps ({'status': 201}), Content_type = "App / Jason") with this code   

The plugin sends part by Chuck to the server Unfortunately the server - next to the right header - interprets them as separate files and creates a new file per copy ... I have a new problem New question is created.

No comments:

Post a Comment