Paperclipped on Heroku?

后端 未结 5 1227
青春惊慌失措
青春惊慌失措 2021-02-14 02:25

I was curious if anyone could get paperclipped working on Heroku without using S3. I\'m assuming Heroku is a read-only system, but there must be some way to save images there.

5条回答
  •  旧时难觅i
    2021-02-14 03:08

    This is for someone like me who doesn't own a credit card and still wants to get this to work as you need to provide credit card credentials to use S3. Cloudinary Gem here allows Rails models managed via Paperclip to store image and file assets on a Cloudinary instance. I only had to add the yaml file to my config directory and specify the storage, path in my model as follows.

    has_attached_file :image,
      :storage => :cloudinary,
      :path => ':id/:style/:filename'
    

    Refer the above link for more details.

提交回复
热议问题