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
Checking out the :url_options plugin, I noticed that if I declare something very straightforward like plugin :url_options, store: { expires_in: 60 * 60 * 24 }, this value gets stored at shrine_class.opts[:url_options][:store], so this line will later retrieve and merge these url options whenever the current storage_key is :store
However, let's assume I am also using the :dynamic_storage and :default_storage plugins, like this:
In this case, the :url_options plugin no longer works properly, because the value of storage_key inside the shrine file context is not :store, but whichever value was dynamically generated (something like :mysubdomain_store.
As an idea for a solution, I tried to find a way to check whether the current storage_key equals the Attacher's :store_key or :cache_key, but I couldn't find a good way to reach the Attacher from inside the UploadedFile instance. Maybe you have a better idea
The text was updated successfully, but these errors were encountered:
Hi
Checking out the
:url_options
plugin, I noticed that if I declare something very straightforward likeplugin :url_options, store: { expires_in: 60 * 60 * 24 }
, this value gets stored atshrine_class.opts[:url_options][:store]
, so this line will later retrieve and merge these url options whenever the currentstorage_key
is:store
However, let's assume I am also using the
:dynamic_storage
and:default_storage
plugins, like this:In this case, the
:url_options
plugin no longer works properly, because the value ofstorage_key
inside the shrine file context is not:store
, but whichever value was dynamically generated (something like:mysubdomain_store
.As an idea for a solution, I tried to find a way to check whether the current
storage_key
equals the Attacher's:store_key
or:cache_key
, but I couldn't find a good way to reach the Attacher from inside the UploadedFile instance. Maybe you have a better ideaThe text was updated successfully, but these errors were encountered: