mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #153] Upload equivalent for download folder as zip #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bernard-crnkovic on GitHub (Dec 10, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/153
Specific Demand
It would be cool if users could have equivalent of 'Download as zip' (?zip query param) for uploading, maybe for bulk uploading whole directory
Implement Suggestion
I suggest same API as current downloading option:
GET /path/to/dir?zip
POST /destination/root?zip (it could use mkdir -p to create missing dirs)
Upload could probably be stream decompressed into dir directly and iterated over zip-entries but you could also create temp dir and move to final destination later.
@sigoden commented on GitHub (Feb 24, 2023):
It's easy to upload a folder using the UI or webdav client.
Even in a terminal, it's also easy for you to upload a folder with
find . -type f | xargs -I{} curl -T{} http://127.0.0.1:5000/{}.It has been opened for 2 months, and there are not many people who like it.
After weighing it, I'm still not ready to support this feature. Hope you can understand.
@lukasjuhrich commented on GitHub (Feb 27, 2023):
FWIW: In case this is not obvious, to upload a whole directory structure, you can issue a
MKCOLwithfind . -type dbefore uploading the files:Although zip upload would be nice eventually, this should suffice for the time being.