Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subfolder support for metalink #2198

Open
maliayas opened this issue Mar 29, 2024 · 1 comment
Open

Subfolder support for metalink #2198

maliayas opened this issue Mar 29, 2024 · 1 comment

Comments

@maliayas
Copy link

Current metalink support actually allows to download a file to a specific subfolder, but only if I also provide a filename:

<?xml version="1.0" encoding="UTF-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" xmlns:a0="http://www.downthemall.net/properties#" >
    <files>
        <file name="some/sub/folder/zvrconvert.zip" >
            <resources>
                <url type="http" >https://www.mediafire.com/file/4yta9move7g546a/zvrconvert.zip</url>
            </resources>
        </file>
    </files>
</metalink>

It simply ignores if I omit the file name:

<file name="some/sub/folder/" >

Implementing the above line would be nice because sometimes filename can not be extracted from the URL, but only content-disposition header.

Thanks in advance.

@maliayas
Copy link
Author

I've done some reading on Metalink 3 and Metalink 4 specs to help developers and also start a discussion.

From Metalink 3 spec (4 is also the same):

<file> MUST have the attribute name containing the file name, as in:
<file name="example.ext">.

Firstly, it turns out that my request slightly contraditcs with both specs because both specs require name attribute for <file>. That means a metalink file always has to define target file name, it just cannot leave it to metalink application to infer from the content-disposition header.

In fact, that was a surprise to me, in terms of UX. Just like my web browser can download any URL and automatically decide the file name, I'd expect the same from a metalink application.

Besides that, I'd like to ask developers about extending Metalink spec in this regard, which I believe would be more intuitive and also still backwards compatible with existing specs.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant