You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I just fixed a problem caused by a misconfiguration with file path. Multiple styles were being generated (:original plus one custom one), but :style wasn't present in the path setting, so a filename conflict occurred.
This resulted in file uploads to a cloud service failing at first (due to a 404 from second delete), then succeeding on second try (no delete request made). It took a long time to figure out why it was "intermittently" failing!!!
Describe the solution you'd like
If there is more than one style (including :original), I think :style should be a required element in the path. Can this be validated upon initialisation?
Describe alternatives you've considered
Alternatively we could update the documentation to point this out
Actually, the path variables and :original style should be more documented anyway.
Additional context
Example configuration that was failing:
has_attached_file:image,path: "images/products/:id_:updated_at.:extension",# <-- no :styledefault_style: :normal,styles: {normal: {# <-- new style defined, without realising that :original also exists by defaultgeometry: '600x600#',format: 'jpg',quality: 80}}
Is your feature request related to a problem? Please describe.
I just fixed a problem caused by a misconfiguration with file path. Multiple styles were being generated (
:original
plus one custom one), but:style
wasn't present in thepath
setting, so a filename conflict occurred.This resulted in file uploads to a cloud service failing at first (due to a 404 from second delete), then succeeding on second try (no delete request made). It took a long time to figure out why it was "intermittently" failing!!!
Describe the solution you'd like
If there is more than one style (including
:original
), I think:style
should be a required element in thepath
. Can this be validated upon initialisation?Describe alternatives you've considered
Alternatively we could update the documentation to point this out
Actually, the
path
variables and:original
style should be more documented anyway.Additional context
Example configuration that was failing:
Dev log from first try:
The text was updated successfully, but these errors were encountered: