Skip to content
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

filename is nil if key is called before attaching file #111

Open
nddeluca opened this issue Oct 11, 2013 · 2 comments
Open

filename is nil if key is called before attaching file #111

nddeluca opened this issue Oct 11, 2013 · 2 comments
Labels

Comments

@nddeluca
Copy link
Collaborator

If these steps are taken:

model = MyModel.new
model.key
model.image = File.open('my-image.jpg')

model.image.filename will return nil and prevent the model from being saved (and thus the file from being stored). Carrierwave_direct shouldn't interfere with the ability to upload files from the server.

@MuneebSarfraz94
Copy link

looks like very irresponsible attitude by the developers no reply at most of the queries . disappointed

@p8
Copy link
Collaborator

p8 commented Jul 2, 2018

This happens because filename is overridden and it assumes fog is used:
https://github.com/dwilkie/carrierwave_direct/blob/master/lib/carrierwave_direct/uploader.rb#L116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants