jeudi 4 février 2021

Do we have any JS libraries which use Fetch API instead of XHR for upload?

I am using the Ember framework and Dropzone as file uploader. Dropzone is working fine but recently in our application, all the XHR calls stopped working and we were unable to find the root cause for it. The calls to backend happened and in-network tab we see 200 OK but still, XHR calls are not resolved and the page was not getting loading.

So for a temporary workaround, we updated all the XHR called to Fetch which is working fine except Dropzone file uploading. I see Dropzone heavily using XHR which makes it impossible to use Fetch API. I was looking into other file uploading libraries like plupload, filepond, filedrop but all are using XHR for file uploading.

Is there any library that uses Fetch API for file uploading? or we can able to hook any JS library to make use of fetch?

Any help should be really appreciated.




Aucun commentaire:

Enregistrer un commentaire