flowjs / flow.js

A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.
Other
2.96k stars 346 forks source link

Support for uploading to Clouds #344

Closed tomaszglinski closed 3 years ago

tomaszglinski commented 3 years ago

Hi, I'm looking for some decent lib for uploading to Azure Blobs, but I guess this feature request might be common for different clouds (saw here already #229 ). In case of Azure, it seems that just small changes in upload code is required to store the chunk directly where it should go (one additional header, chunk number in URL parameter). I don't know other clouds, but I guess also some minor tweaks might be required. So: Is it possible to have some 'config' to say that my storage is on Azure, AWS, GCP or whatever, and thanks to this have no or almost no need for setting up the server? From cost/feature perspective it looks like a cherrypick :)

Disclaimer: I'm not JS dev, just looking around for solution

tomaszglinski commented 3 years ago

PS: In Azure also a 'commit' is required at the end (basing on http://gauravmantri.com/2013/02/16/uploading-large-files-in-windows-azure-blob-storage-using-shared-access-signature-html-and-javascript/)

drzraf commented 3 years ago

AWS and Openstack are already supported but it's not like switching a flag/parameters on/off. According to the HTTP particularities of your provider, you can adapt the XHR. In the query and headers hooks you can change each requests in any possible way.