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
Some times, I will import some image data from rake task, so, my mounted image
field will have a http://some_site/some_image.png value.
so,I will handle this situation with override uploader url method like this:
defurl# here, if not use a serialize field, model[mounted_as] will get the original value.original_url=model[mounted_as]original_url =~ %r{\Ahttps?://} ? original_url : superend
But if use serialize, model[mounted_as] or model.read_attribute[mounted_as is
not worked anymore,we need a new api to get the correct value.
Here, if can expose a original_url API, is good. Thanks.
The text was updated successfully, but these errors were encountered:
zw963
changed the title
Need a convenient method to get original field real value.
[Feature Request] Need a convenient method to get original field real value
Oct 21, 2015
Some times, I will import some image data from rake task, so, my mounted image
field will have a
http://some_site/some_image.png
value.so,I will handle this situation with override uploader url method like this:
But if use serialize,
model[mounted_as]
ormodel.read_attribute[mounted_as
isnot worked anymore,we need a new api to get the correct value.
currently, I have to do like this:
Here, if can expose a original_url API, is good. Thanks.
The text was updated successfully, but these errors were encountered: