Skip to content

Archiver should use appropriate filename for resulting archive #308

Closed
opencloud-eu/opencloud
#2950

Description

@fschrempf

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.

Additional context

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

Thanks!

Activity

  1. rhafer commented on Sep 24, 2025

    @rhafer
    Member

    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.

  2. fschrempf commented on Sep 25, 2025

    @fschrempf
    Author

    AFAICS ocis doesn't behave any different regarding the name of the archive.

    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.

  3. rhafer commented on Sep 25, 2025

    @rhafer
    Member

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

  4. moved this from Qualification to No status in OpenCloud Team Boardon Nov 11, 2025
  5. moved this from Qualification to No status in OpenCloud Team Boardon Nov 20, 2025
  6. michaelstingl commented on Jun 3, 2026

    @michaelstingl

    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.

  7. self-assigned this
    on Jun 11, 2026
  8. moved this from Prio <= 3 to In Progress in OpenCloud Team Boardon Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions