Skip to content

Commit 0101cfd

Browse files
authored
Fix CarrierWave store! method
This broke for us upgrading to cloudinary v2 i assume this was a legacy setting
1 parent 5853b97 commit 0101cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cloudinary/carrier_wave/storage.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def store!(file)
3636
params[:type]=uploader.class.storage_type
3737

3838
params[:resource_type] ||= :auto
39-
upload_method = uploader.upload_chunked? ? "upload_large" : "upload"
39+
upload_method = uploader.respond_to?(:upload_chunked?) && uploader.upload_chunked? ? "upload_large" : "upload"
4040
uploader.metadata = Cloudinary::Uploader.send(upload_method, data, params)
4141
if uploader.metadata["error"]
4242
raise Cloudinary::CarrierWave::UploadError.new(uploader.metadata["error"]["message"], uploader.metadata["error"]["http_code"])

0 commit comments

Comments
 (0)