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
{{ message }}
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.
resource.attachment.filename always returns nil due to CarrierWave not being able to access the underlying identifier column. This occurs when the identifier column has the same name as the Uploader property (which currently is the only way to use carrierwave-datamapper due to issue #9).
However, I can directly access the identifier column using instance_variable_get("@attachment"). Also, resource.attachment.path behaves as expected.
Is there any workaround this issue?? It is pretty neat not having to define a property for the storage as carrierwave does this automatically now, but I want to read just the filename stored in the database and as I'm using config.storage = :fog and config.fog_public = false I'm always getting and authenticated link to the filename in AWS. How do I read just the filename stored on the DB?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
resource.attachment.filename
always returnsnil
due to CarrierWave not being able to access the underlying identifier column. This occurs when the identifier column has the same name as the Uploader property (which currently is the only way to use carrierwave-datamapper due to issue #9).However, I can directly access the identifier column using
instance_variable_get("@attachment")
. Also,resource.attachment.path
behaves as expected.carrierwaveuploader/carrierwave#249
Environment details:
The text was updated successfully, but these errors were encountered: