Skip to content
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

Open
May-Lee opened this issue Dec 13, 2022 · 4 comments
Open

How can folder transfer be implemented in the browser? #110

May-Lee opened this issue Dec 13, 2022 · 4 comments
Labels
Dilation Relates to or requires Dilation enhancement New feature or request

Comments

@May-Lee
Copy link

May-Lee commented Dec 13, 2022

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.

@donpui
Copy link
Contributor

donpui commented Dec 13, 2022

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.

@donpui donpui added the enhancement New feature or request label Dec 13, 2022
@meejah
Copy link
Collaborator

meejah commented Dec 13, 2022

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).

@meejah meejah closed this as completed Dec 13, 2022
@piegamesde piegamesde changed the title How can zipping be implemented in the browser? How can folder transfer be implemented in the browser? Dec 13, 2022
@piegamesde
Copy link

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?

@piegamesde piegamesde reopened this Dec 13, 2022
@meejah
Copy link
Collaborator

meejah commented Dec 13, 2022

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

@meejah meejah added the Dilation Relates to or requires Dilation label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dilation Relates to or requires Dilation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants