szimek / sharedrop

Easy P2P file transfer powered by WebRTC - inspired by Apple AirDrop
https://www.sharedrop.io
MIT License
9.99k stars 729 forks source link

Feature request: Transfer multiple files at once #64

Closed iBobik closed 3 years ago

iBobik commented 6 years ago

Multiple files are not accepted by select dialog neither drag&drop.

txjohn69 commented 5 years ago

Multiple files would be nice...however you can just zip up the files and send the single archive

benwinding commented 4 years ago

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?

valoricDe commented 4 years ago

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?

GO3LIN commented 4 years ago

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 ?

valoricDe commented 4 years ago

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.

valoricDe commented 4 years ago

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.

szimek commented 3 years ago

@valoricDe Thanks again for implementing this feature! It is deployed to production 🎉