Following the readme for Shrine and Shrine-Cloudinary to get some simple image uploads going fails with Cloudinary producing an invalid URL when attempting to move the image from cache to storage.
require "shrine"
require "cloudinary"
require "shrine/storage/cloudinary"
Cloudinary.config(
cloud_name: ENV.fetch('CLOUDINARY_NAME'),
api_key: ENV.fetch('CLOUDINARY_API_KEY'),
api_secret: ENV.fetch('CLOUDINARY_API_SECRET'),
)
Shrine.storages = {
cache: Shrine::Storage::Cloudinary.new(prefix: "dev/cashe"),
store: Shrine::Storage::Cloudinary.new(prefix: "dev/site"),
}
Shrine.plugin :activerecord # loads Active Record integration
Shrine.plugin :cached_attachment_data # enables retaining cached file across form redisplays
Shrine.plugin :restore_cached_data # extracts metadata for assigned cached files
Following the readme for Shrine and Shrine-Cloudinary to get some simple image uploads going fails with Cloudinary producing an invalid URL when attempting to move the image from cache to storage.
Form:
Error:
Stacktrace:
Note the lack of a cloudinary domain name in the temp file URI. The temp files do appear on Cloudinary, I can see & manipulate them via the UI.