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

Images are saved as .htm files #22

Closed
fu510n opened this issue Mar 21, 2019 · 2 comments
Closed

Images are saved as .htm files #22

fu510n opened this issue Mar 21, 2019 · 2 comments

Comments

@fu510n
Copy link

fu510n commented Mar 21, 2019

Thanks for this great addon.

I have only found 1 minor issue so far:

All images get saved as myherokuservername.htm and not imagename.jpg or whatever.

I can simply rename them afterwards, but I'm curious if I'm alone with this issue, or is it a known side-efffect?

I have only tested this behaviour in Firefox Android (latest stable) as I don't have access to a computer at the moment.

Thanks

@changhaitravis
Copy link
Contributor

changhaitravis commented Mar 22, 2019

I could maybe try fixing this on the proxy server by setting the content-disposition 'filename' header, but then even if it works you'd be downloading a potentially very lossy .webp file. We should allow passthrough to the original image for this case, but idk how to distinguish, there needs to be something in the request headers...

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition

Update*: Tried setting the Content-Disposition headers they do not seem to help very much on Firefox for Android. Does seem to help preserve the original filename on Firefox for desktop where it was already getting the .webp file extension right...

@milahu
Copy link

milahu commented Sep 26, 2019

same problem:
the original file name is not used in a "save image" dialog

proposed solution:
use a different URL scheme, like

https://proxy-domain/https/original-domain/path/to/file.jpg.c20.webp

url-encoding the original url is not necessary

the original url can be simply appended to the proxy prefix
only replace https:// with https/
and append .webp

move the parameters l=20 and bw=0 to the suffix
with "c" = color and "b" = black/white

optional parameters can be prepended to the path, like

https://proxy-domain/key1=value1/key2=value2/https/original-domain/path/to/file.jpg.c20.webp

We should allow passthrough to the original image

why not do this client-side?
just add the context menu items "view original" and "save original"
ideally using only one line of the context menu

milahu added a commit to milahu/bandwidth-hero that referenced this issue Jul 18, 2020
old format /?url=https%3A%2F%2Fhost%2Fpath%2Ffile.jpg&jpeg=0&bw=0&l=50
new format /https/host/path/file.jpg.c50.webp
solve issue ayastreb#22 
new format must be supported by server (bandwidth-hero-proxy)
@fu510n fu510n closed this as completed Jun 6, 2024
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

3 participants