-
Notifications
You must be signed in to change notification settings - Fork 278
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
Use a static path for the icon/logo #159
Comments
That is intended, so on reach new release all assets are force-reloaded. That prevents inconsistency issues with partial caches. I guess we can simply disable the hash for the favicon assets, because those aren't mission critical (to be up-to-date). Would that be fine? That way we have a static URL without a new route and/or redirect. |
Yeah, I figured it was for cache busting, but it is of course problematic when one needs to reference the files externally. Yes, that would be great! As you know, Send already has the [[ -n "${UI_CUSTOM_ASSETS_ICON}" ]] && ln -sf "${UI_CUSTOM_ASSETS_ICON}" assets/icon.svg The only potential issue with this approach is that the This code could then also be simplified by removing the ternary operator: Lines 25 to 28 in 9f09a79
|
This was originally proposed in #15 (comment)
This is needed for my "FileLink provider for Send" Thunderbird add-on. As of Thunderbird 91.4.1, extensions can provide a URL for the icon of the service after uploading a file, which is added to the message instead of using the extension's icon. Some of the Send service instances of course use different icons/logos and this would allow the correct one to be added to the message. However, there does not currently seem to be a consistent path/filename for the icon.
Of the 19 public Send instances:
/icon.718f87fb.svg
/icon.26e159f8.svg
/icon.fd04d81a.svg
/Chapril-banner/v2/chapril-banner-logo.png
/portailpro-logo.bff132c0.png
/logo_acted_full.1d533b41.svg
.Note that the file for the default icon is here: https://github.com/timvisee/send/blob/master/assets/icon.svg, but Webpack adds those pesky hashes:
send/common/generate_asset_map.js
Lines 7 to 9 in 9f09a79
I propose something like a new
/__icon__
endpoint which returns the icon, either directly or by an HTTP 301 redirect. An alternative would be to include afavicon.svg
file, which is already a standard supported by many browsers, but some Send instances may not want to use an SVG icon. The existingfavicon.ico
file is too small and still uses the old Firefox Send logo for 16 of the 19 public Send instances due to #158.The text was updated successfully, but these errors were encountered: