-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can folder transfer be implemented in the browser? #110
Comments
There is folder upload option, which currently is disabled and not fully developed. However, this functionality would allow drop folder or even several files, which would be zipped on client side and sent to receiver as Zip. We would need to experiment more to find out what exactly is missing here to enable this feature. Also it can raise some new challenges, like how to check folder size. |
We have current plans to implement "multiple file" transfers, meaning we shouldn't have to use Zip at all. (This has good implications for all the other implementations too, because doing Zip doesn't play nicely with streaming etc). That is, the UX from a user perspective should be: they drop a directory (or "open" a directory) and all the files are sent. Details like whether they were zipped or not shouldn't matter to the user -- they do matter right now only because we support just a single file. Right? (Please re-open if there's something else here). |
Even when ignoring the zipping, I still have open questions: AFAIK, recursively walking a folder's content is not a Thing with browsers? I remember Nextcloud having problems with this too. And same thing for the receiving side, how does "receiving a folder" look like in a browser? I've never ever seen a site where I could just download a folder like that. So probably we'd have to zip it on the fly on the receiving end anyways? |
This is now exploding into a "UX and other stuff" question though, which seems far beyond the original scope. But, okay I guess? There are potential implications with the "permissions" API etc too: so far we've discussed tying offer/answers to "a thing the user would select" (e.g. if they selected "a directory" then it's "a directory offer" and you can accept or decline it as a whole). So, ideally we could indeed do that API in a browser too. It seems like this (drag-and-drop ONLY) API could work for everything we want: https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API Note that MDN also lists an experimental "file system access API" (which Firefox considers harmful and will not be implementing) which is different: https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API |
There's currently a limit on file sizes over 200MB, which requires the sender to zip before sending, adding an additional context switch for the user. @piegamesde suggests: One big optimization is not to having the user zip the folder before sending. However, I'm not sure this can be implemented in the browser without involving desktop applications.
I suggest we investigate the possibilities for having zipping implemented in the browser, and if it makes sense, implement this.
The text was updated successfully, but these errors were encountered: