react-activestorage-provider icon indicating copy to clipboard operation
react-activestorage-provider copied to clipboard

If image upload errors, ready remains false

Open sweetro opened this issue 6 years ago • 1 comments

The library works great, but I'm noticing that, while using the DirectUploadProvider if one of my uploads receives an error response from the server, the ready prop remains false.

I believe it is do to the fact that the Promise.all rejects and then uploading: false is never set https://github.com/cbothner/react-activestorage-provider/blob/6be6084e90552bec86a92d3be914d0eca7739b80/src/DirectUploadProvider.js#L90, making it unable to try the upload again.

Perhaps I'm missing a prop or an approach to handle this case - has anyone else ran into this? Perhaps there should be an onError function that can call during the direct upload if one of the uploads fails.

sweetro avatar Oct 18 '19 20:10 sweetro

Happening here as well

leom806 avatar May 08 '24 12:05 leom806