Skip to content

Sharelink directly to file leaves browser guessing file extension (fails on say zip) #281

@aputtu

Description

@aputtu

If a ERDA user creates a sharelink directly to a file, the URL does not contain info file extension.
This leaves the browser guessing on whether the file is a *.xslx|zip|tar.gz|jpg|..

Expected behaviour

As a user, I expect that I download file including file extension, when I click on a received sharelink.

Example of sharelink to a zip file that fails

Here is an example of a sharelink URL pointing to a zip file: https://sid.erda.dk/share_redirect/bEUjQiXAP5

When users clicking on the link on file content gets displayed in browsers like Chromium, or downloaded without file extension on Firefox.
Here is what Chromium displays:

Image

The same goes for "wget https://sid.erda.dk/share_redirect/bEUjQiXAP5", it simply saves a file without the file extension.

Current workaround

We currently suggest that users create sharelinks to a folder, wherein the files get placed, in order to avoid the above.

Technical inputs

The reason the issue occurs is that we symlink directly to the share_id i sharelink_home, and when downloading through browser, the file extension is lost.
One model would be to create an internal share_id folder in sharelink_home, which agains symlinks to the file with the original file name. Display of sharelinks then needs to be the file list (ls.py), like it is for sharelinks to folders, where users simply can click on the file to fetch it with the original file name.

This could be a good opportunity to rethink how sharelinks are accessed, as having a dedicated folder to sharelinks would allow for setting your own password or ssh key, rather than automatically coupling the share_id as password (or to disable password login option).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions