You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Archiver should use appropriate filename for resulting archive #308
Is your feature request related to a problem? Please describe.
When downloading a single directory from the UI, the resulting filename is always download.zip.
Describe the solution you'd like
Instead it would be much more user-friendly to name the archive after the selected directory. That's also what is currently implemented in the oCIS reva.
I'm not familiar with the codebase and even with go in general, so I'm struggling to provide a PR here. Maybe someone else can solve this or provide a few hints on how to retrieve the directory name from the ResourceId within the CreateZip() or CreateTar().
Instead it would be much more user-friendly to name the archive after the selected directory. That's also what is currently implemented in the oCIS reva.
AFAICS ocis doesn't behave any different regarding the name of the archive. But I agree, having the zip/tar file named after the directory is a nice idea.
@fschrempf Thanks for the pointer. It probably not straight forward to port that over to our code since the archiver is working id based now, but problably not too hard either. At least it's good starting point.
Ah, and I almost forgot. Patches are always welcome. 🙂
Opened #661 for this. It resolves the name from the resource id (a Stat in the handler) and sets it on Content-Disposition, so the id-based archiver wasn't a blocker. Multiple resources keep download, and non-ASCII names are encoded per RFC 6266.
🤖 drafted with Claude Code, reviewed before submitting.
Activity
rhafer commentedon Sep 24, 2025
AFAICS ocis doesn't behave any different regarding the name of the archive. But I agree, having the zip/tar file named after the directory is a nice idea.
fschrempf commentedon Sep 25, 2025
Ok, that was probably me mixing up ocis and the CS3 reva code I looked at. The latter actually passes the name here: https://github.com/cs3org/reva/blob/master/internal/http/services/archiver/handler.go#L258.
rhafer commentedon Sep 25, 2025
@fschrempf Thanks for the pointer. It probably not straight forward to port that over to our code since the archiver is working id based now, but problably not too hard either. At least it's good starting point.
Ah, and I almost forgot. Patches are always welcome. 🙂
[Build-deps]: Bump github.com/coreos/go-oidc/v3 from 3.11.0 to 3.14.1 (…
feat(archiver): name the archive after the resource
feat(archiver): name the archive after the resource
michaelstingl commentedon Jun 3, 2026
Opened #661 for this. It resolves the name from the resource id (a Stat in the handler) and sets it on
Content-Disposition, so the id-based archiver wasn't a blocker. Multiple resources keepdownload, and non-ASCII names are encoded per RFC 6266.🤖 drafted with Claude Code, reviewed before submitting.
feat(archiver): name the archive after the resource
feat(archiver): name the archive after the resource