ProgerXP / FileDrop

Self-contained cross-browser pure JavaScript class for Drag & Drop and AJAX (multi) file upload.
filedropjs.org
The Unlicense
264 stars 61 forks source link

Accept HTTP 20x as success, not error #48

Open PavelVanecek opened 9 years ago

PavelVanecek commented 9 years ago

Our server endpoint returns 201 HTTP status code, but filedrop.js considers this as an error and calls the error handler. Given the semantics, this should be considered success and call the file.event("done", ...) listener.

crabhi commented 9 years ago

Hi @ProgerXP, @bollwyvl, according to this commit, it seems intentional but I couldn't find any reason why should 2xx responses be considered failures. What was your use case?