eexit / ghost-storage-cloudinary

:rocket: A fully-featured and deeply tested Cloudinary Ghost storage adapter

Home Page:https://ghost.org/integrations/cloudinary/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

public_id is always set

cthulu opened this issue · comments

I think this is a problem if you want to be able to be to upload images with the same name and still have them uniquely named - using the unique_filename option. Because the public_id is always set, Cloudinary will use that and never generate the unique filename.

I've solved this locally by modifying the source code (commenting out index.js:72, but I believe this might affect more people. Would public_id need to be set anyway? The upload options should be able to solve all of this automagically, right?

Hi @cthulu,

Indeed, the public_id is always set because I originally developed this adapter to use it with my RetinaJS plugin, which requires using the same file name from the beginning.

I believe I could re-work this part to upload the first image, get its name and generate the retina variants from it but it would be a lot of back and forth with Cloudinary API.

However, I will try to make this option available because you might not be the first person who would like to enjoy this Cloudinary feature.

Hey, any chance of including this in the next release?