cloudinary_gem icon indicating copy to clipboard operation
cloudinary_gem copied to clipboard

After upgrading to CarrierWave 1.0+, need to reload model for file not to be nil

Open cgriego opened this issue 7 years ago • 10 comments

After upgrading CarrierWave to 1.0.0.beta or higher, tests using Cloudinary + CarrierWave started failing because model.image.file were nil until the model was reloaded.

I think this person ran into the same issue. https://stackoverflow.com/questions/46271081/carrierwave-cloudinary-image-upload-works-but-null-values-returned-right-after-u

cgriego avatar May 08 '18 15:05 cgriego

I apologize for the very late reply. Unfortunately, it's a known bug in carriwave (there are a couple of open issues on GH). A workaround will be to reload as you mention.

shirlymanor avatar Aug 28 '18 16:08 shirlymanor

@cgriego did you make any progress with this other than forcing the model to reload? I can't find any issues in carrierwave referencing this either. Thanks!

bbugh avatar Oct 23 '18 15:10 bbugh

I still have the model reload workaround in place.

cgriego avatar Oct 23 '18 20:10 cgriego

Closing this issue due to the time elapsed. Please feel free to either re-open the issue, contact our support at http://support.cloudinary.com or create a new ticket if you have any additional issues.

shirlymanor avatar May 13 '19 17:05 shirlymanor

I can confirm this issue is not happening with carrierwave 1.3.1 and cloudinary 1.11.1.

cgriego avatar May 13 '19 18:05 cgriego

Sorry, yes this issue does still happen with the latest gem versions mentioned above. Please reopen.

cgriego avatar May 13 '19 18:05 cgriego

Could this be re-opened?

aceunreal avatar Apr 09 '21 03:04 aceunreal

Hi, I have raised an internal ticket and our Dev team will be looking at this issue. Thanks, Mo

momoip avatar Apr 12 '21 16:04 momoip

Any update?

# same here

gem 'carrierwave', '~> 2.2.2'
gem 'cloudinary', '~> 1.22.0'

david-zw-liu avatar Mar 25 '22 07:03 david-zw-liu

Hi, @david-liu-950627 - Thanks for following up on this and for creating the PR. I have added one of my colleagues as a reviewer.

aleksandar-cloudinary avatar Mar 25 '22 10:03 aleksandar-cloudinary