-
Notifications
You must be signed in to change notification settings - Fork 91
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
correctif(dolist): utilise des liens vers les logos des procedures plutôt que des attachements.inlined #9369
correctif(dolist): utilise des liens vers les logos des procedures plutôt que des attachements.inlined #9369
Conversation
PR Summary
|
425e8e4
to
5541db7
Compare
@@ -73,7 +73,7 @@ | |||
# generate variants to use image processing macros and ruby-vips | |||
# operations. See the upgrading guide for detail on the changes required. | |||
# The `:mini_magick` option is not deprecated; it's fine to keep using it. | |||
Rails.application.config.active_storage.variant_processor = :vips |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pourquoi ? vips est plus moderne et rapide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vu avec nico. ca tire 70 dependances sur l'infra dont le serveur X de firefox :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aïe mince je comptais aussi sur vips pour les filigranes :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
la c'etait pour eviter de poluer l'infra pour un gain de perf marginal (on retaille qq logo...). A voir si le filigranes se fait ac imagemagick ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oui :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On peut pas changer de distrib ? C'est vraiment complètement pété ubuntu...
app/models/procedure.rb
Outdated
@@ -702,7 +702,7 @@ def missing_steps | |||
|
|||
def logo_url | |||
if logo.attached? | |||
Rails.application.routes.url_helpers.url_for(logo) | |||
Rails.application.routes.url_helpers.url_for(logo.variant(resize_to_limit: [150, 150]).processed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cette url va expirer au bout d'une heure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merci, a creuser le sujet je ne vois pas de solution plus simple que de mettre un expires lointain. Qu'en penses-tu ?
[autre option serait de mettre un bucket public, mais ca demande a migrer les pjs existantes etc...]. J'imagine qu'au bout de 6 mois on peut considerer ces liens ds les mails comme mort sans soucis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on pourrait réorganiser les options du BlobSignedIdConcern
pour qu'on puisse overrider le expires_in
avec nil
, ou 99.years
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je passe juste l'expires_in
a la methode url
qui le supporte.
J'ai regardé d'autres pistes mais toutes m'avaient l'air overkill. Si on souhaite vraiment faire du public sans trop tritouiller les internes de rails, le service openstack_public serait le plus propre je pense: https://github.com/chaadow/activestorage-openstack#usage (ca demande juste une duplication préalable des procedures.logo
existants).
pour l'expires, j'ai mis 6.months
, est-ce vraiment necessaire de pousser au dela ? [hésites pas a affirmer un truc j'ai pas d'avis la dessus]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour moi, la bonne approche consiste à exposer une URL publique du genre /assets/logo/:key
avec une redirection. Je ne suis pas fan des URL avec une longue expiration dans la nature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merci, je merge ta PR et utilise cette route (l'idée était de laisser le storage servir les PJs directement plutôt que passer par notre infra pour le redirect. mais c'est top !
c2a5ebf
to
3456129
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ça me paraît bon. Juste un retour sur la durée.
A vérifier: évidement sur dolist, mais aussi que brevo ne rajoute pas du tracking à notre insu sur l'url de l'image :/
EDIT: je suis en train de capter que l'expires va rajouter des query params dans l'url ; à voir si ça trigger pas certains blockers, mais on le saura à l'usage en fonction des retours
@@ -73,7 +73,7 @@ | |||
# generate variants to use image processing macros and ruby-vips | |||
# operations. See the upgrading guide for detail on the changes required. | |||
# The `:mini_magick` option is not deprecated; it's fine to keep using it. | |||
Rails.application.config.active_storage.variant_processor = :vips |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oui :)
343b7e0
to
2a29eba
Compare
2a29eba
to
b093df6
Compare
eb84b02
to
3de6b17
Compare
…utôt que des attachements.inlined
…e logo dans les mails
3de6b17
to
bf6b5ea
Compare
hs: https://secure.helpscout.net/conversation/2296819535/2034810/
contexte
l'ami dolist qui supporte pas les attachments inline 🤦 .
solution
on fait plus d'attachement inline pour le logo des demarches