Closed
Description
Enabling 'testChunk' means if a chunk is not found a 404 (or non 200 HTTP status) is returned. Although this is perfectly valid API design its quite annoying to see lots of 404's in my logs etc. Can I propose the the following change:
If a chunk is found return the following JSON:
{"success":true,"message":"Chunk found."}
If a chunk is not found return the following JSON:
{"success":false,"message":"Chunk not found."}
The following code changes can be made in resumable.js:
var testHandler = function(e) {
$.tested = true;
var status = $.status();
if(status=='success') {
var response = JSON.parse($.xhr.responseText);
if(response.success == false) {
$.send();
} else {
$.callback(status, $.message());
$.resumableObj.uploadNextChunk();
}
} else {
console.log("HTTP Error.");
}
};
Metadata
Metadata
Assignees
Labels
No labels