cloudinary_gem icon indicating copy to clipboard operation
cloudinary_gem copied to clipboard

Cloudinary gem overwrites field with singular file when using mount_uploaders

Open chendo opened this issue 7 years ago • 5 comments

Cloudinary v1.7 Carrierwave v1.0.0

I attempted to use mount_uploaders with the Cloudinary gem, however the store_cloudinary_identifier sets the column to the filename for each file, resulting in only the last file being stored correctly. Removing the call to this method appears to fix the issue, however it would only store the unversioned URLs.

Console log of the issue:

backend_1  |   SQL (6.0ms)  UPDATE `profiles` SET `photos` = '[\"tigmtatdqdkvijhntzbz.jpg\",\"fdj9bkwewy9hxgbognx0.jpg\",\"vyolu1xr0rfzxcrfean5.jpg\"]', `rates` = '[{\"duration\":\"15\",\"price\":\"60\"},{\"duration\":\"30\",\"price\":\"30\"},{\"duration\":\"45\",\"price\":\"1212\"}]', `updated_at` = '2017-04-25 14:17:33' WHERE `profiles`.`id` = 1
backend_1  |   SQL (0.8ms)  UPDATE `profiles` SET `profiles`.`photos` = '\"image/upload/v1493129856/tigmtatdqdkvijhntzbz.jpg\"' WHERE `profiles`.`id` = 1
backend_1  |   SQL (0.6ms)  UPDATE `profiles` SET `profiles`.`photos` = '\"image/upload/v1493129858/fdj9bkwewy9hxgbognx0.jpg\"' WHERE `profiles`.`id` = 1
backend_1  |   SQL (0.4ms)  UPDATE `profiles` SET `profiles`.`photos` = '\"image/upload/v1493129862/vyolu1xr0rfzxcrfean5.jpg\"' WHERE `profiles`.`id` = 1

chendo avatar Apr 25 '17 14:04 chendo

+1

oddlyfunctional avatar May 22 '17 15:05 oddlyfunctional

Hi @chendo, @oddlyfunctional. I apologise for the late reply. We're checking this issue now and will update soon with our insights.

roeeba avatar Oct 03 '17 11:10 roeeba

Hey, guys. It's on our roadmap to add support to multiple uploads via CW. In the meantime, please try this workaround: https://github.com/taragano/Cloudinary_multiple_uploads

roeeba avatar Oct 08 '17 09:10 roeeba

@roeeba any updates for this enhancement ? it's been a year

move2 avatar Mar 23 '18 16:03 move2

@move2 It's currently still on our to-do list. We will gladly send updates when this is completed.

marissa-masangcay avatar Mar 23 '18 22:03 marissa-masangcay

Fixed in #501

const-cloudinary avatar Apr 02 '24 13:04 const-cloudinary