Closed iBobik closed 3 years ago
Multiple files would be nice...however you can just zip up the files and send the single archive
Apple's Airdrop allow's multiple files and it's extremely useful.
One of the most common use-case's is to transfer multiple photos from a phone to a computer... which is annoying to do one by one, or select and zip them.
Is there any plans to develop this feature?
Who want's to start with this? I guess we would need to update: https://github.com/cowbell/sharedrop/blob/master/app/components/file-field.js https://github.com/cowbell/sharedrop/blob/master/app/templates/components/peer-widget.hbs https://github.com/cowbell/sharedrop/blob/master/app/controllers/index.js
I'm unsure if we need multiple file-field's or the file-field would need to pass the file array to the uploadFile method @szimek do you see any pitfalls one might fall into?
I am really interested to help on this, will have some time this weekend 👍
EDIT: The thing is that it will be very bad for user experience to accept every single file download... So a simple solution is to zip the files if there are many through sharedrop. What's your thoughts on it ?
Hmm, zip is a good idea but that makes it much more complex I guess. I imagine a smartphone where a user selects 500 images which would need to be packaged up to a zip file. Which either doesn't work at all due to ram limitations or would require a progress bar. But let's create a protoype with https://www.npmjs.com/package/jszip maybe we can also use something like this https://www.npmjs.com/package/zip-stream to stream the data right away so that the data can already transfered.
Actually is seems to be possible to use https://stuk.github.io/jszip/documentation/api_jszip/generate_internal_stream.html, https://stuk.github.io/jszip/documentation/api_zipobject/internal_stream.html to generate a zip stream.
@valoricDe Thanks again for implementing this feature! It is deployed to production 🎉
Multiple files are not accepted by select dialog neither drag&drop.