[GH-ISSUE #153] Upload equivalent for download folder as zip #71

Closed
opened 2026-04-08 16:50:10 +03:00 by zhus · 2 comments
Owner

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.

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.
zhus closed this issue 2026-04-08 16:50:10 +03:00
Author
Owner

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

<!-- gh-comment-id:1442656766 --> @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.
Author
Owner

@lukasjuhrich commented on GitHub (Feb 27, 2023):

FWIW: In case this is not obvious, to upload a whole directory structure, you can issue a MKCOL with find . -type d before uploading the files:

find . -type d | xargs -I{} curl -X MKCOL http://127.0.0.1:5000/{}
find . -type f | xargs -I{} curl -T{} http://127.0.0.1:5000/{}

Although zip upload would be nice eventually, this should suffice for the time being.

<!-- gh-comment-id:1446241874 --> @lukasjuhrich commented on GitHub (Feb 27, 2023): FWIW: In case this is not obvious, to upload a whole directory structure, you can issue a `MKCOL` with `find . -type d` before uploading the files: ```shell find . -type d | xargs -I{} curl -X MKCOL http://127.0.0.1:5000/{} find . -type f | xargs -I{} curl -T{} http://127.0.0.1:5000/{} ``` Although zip upload would be nice eventually, this should suffice for the time being.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#71