Page MenuHomePhabricator

Downloaded subtitles get saved as "index.php"
Open, Needs TriagePublic

Description

When you save a TimedText page in the browser, the file is always saved as "index.php". (Example)

This can be fixed by including an HTTP header such as

Content-disposition: attachment; filename=President_Kennedy%27s_Speech_at_Rice_University.srt

Event Timeline

TheDJ subscribed.

Is this url exposed anywhere as a download ?
Normally, I would not consider this to be a download link for the content.

The 'proper' url for the VTT representation (as used by the player) would be https://commons.wikimedia.org/w/api.php?action=timedtext&format=json&title=File:President_Kennedy%27s_Speech_at_Rice_University.ogv&trackformat=vtt&lang=en&formatversion=2
And for the SRT representation it would be: https://commons.wikimedia.org/w/api.php?action=timedtext&format=json&title=File:President_Kennedy%27s_Speech_at_Rice_University.ogv&trackformat=srt&lang=en&formatversion=2

These do have content-disposition headers, and Chrome and Firefox do suggest the correct filename. (Safari doesn't because... well Safari. ticket filed)

This (as is action=raw) is an internal representation however. There isn't really a download link and you'd get the same 'index.php' result for any other page you would 'Save as' via action=raw, as it is just plain text (that is what the raw means).

I've created T381970 as a feature request.

TheDJ removed TheDJ as the assignee of this task.Sep 14 2025, 12:07 PM