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
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
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T381928 Downloaded subtitles get saved as "index.php" | |||
| Open | Feature | None | T381973 Ensure downloads from action=raw are saved with a proper filename instead of index.php |
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.