parchment
parchment copied to clipboard
Use redirected URLs for storyfile name
https://iplayif.com/?story=https%3A%2F%2Funbox.ifarchive.org%2F%3Furl%3Dhttp%253A%252F%252Fwww.ifarchive.org%252Fif-archive%252Fgames%252Ftads%252FLydiasHeart.zip%26open%3DLydiasHeart.t3
Unboxer URLs use the whole query for the storyfile name (used in the Dialog file browser).
We should instead use the final redirected URL.
The proxy should also return a redirected URL in a header.
Still doesn't work well for some files:
https://github.com/i7/counterfeit-monkey/releases/download/r11.1/CounterfeitMonkey-11.gblorb
has a final redirect of
https://objects.githubusercontent.com/github-production-release-asset-2e65be/56413466/c3b77188-291a-4475-89e9-34d99b8ffbe4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250319%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250319T224139Z&X-Amz-Expires=300&X-Amz-Signature=fd850dd00b448127c1eabe6117bf88753f76e00fd57f41309fef07944b1a503c&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B filename%3DCounterfeitMonkey-11.gblorb&response-content-type=application%2Foctet-stream
Maybe instead of looking at URLs it should look at the content-disposition header? Or not send Final-Url if the file is an attachment?