davit wrote:In Plupload 2 - yes. That's the way currently.
I'm actually trying to implement a retry-mechanism in plupload 2 based on your recommendation, but sadly I can't find any way to get this to work:
uploader.bind("FileUploaded", function(up, file, result){
// parse result and check for error, if so, requeue file
up.stop();
file.status = plupload.QUEUED;
up.start();
});
If I bind my FileUploaded function prior to the uploader.init() method, the file.status will be overwritten in pluploader.js own binding afterwards to file.status = plupload.DONE and the uploader continues to upload the next file.
In case I bind my FileUploaded function after the initialization method, I have no chance in preventing the uploader from continuing with the next file.
I'm currently using JSON responses to return the upload response from the server to the client which does not trigger an HTTP Error on the client side. I think these are intended for "real" HTTP errors.
Or should the file be cloned somehow in case of an error and appended to the queue? But I couldn't find any code which could confirm this assumption.
It would be great if you could point me into the right direction. - Thanks!