FileDrop icon indicating copy to clipboard operation
FileDrop copied to clipboard

Only 200 OK status is taken into account

Open romainbessugesmeusy opened this issue 10 years ago • 2 comments
trafficstars

Hey all, It seems that filedrop is considering the XHR to be in error if its statusCode is strictly different of 200, which is quite restrictive. Servers might respond with 201 Created or any 2XX status code, and the response should still be correct. Do you want me to submit a pull request ?

https://github.com/ProgerXP/FileDrop/blob/33f85ce84a1df890ab5d9dcf6d105c457b2f18b0/filedrop.js#L2066

romainbessugesmeusy avatar Sep 23 '15 12:09 romainbessugesmeusy

I'm running into this same issue myself, would appreciate it if the system could allow for anything in the 200 range to trigger the done event...

moberemk avatar Sep 15 '16 17:09 moberemk

I will add a config for this in the future. For now you can easily work around this by adding an error listener and if the code is in your accepted range - fire done event manually which will trigger normal processing.

ProgerXP avatar Sep 21 '16 09:09 ProgerXP