You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to upload a SVG file. I am using cloudinary on heroku.
I added "include Cloudinary::CarrierWave" to uploader.
Name of the file is saved in the model, but not in media library on cloudinary.
I had same issue with PNG uploader, but adding
process:convert=>'png'
solved the problem.
I read in docs that i need to set resource_type to raw, but i see in code that if it's not given, it assume that it is 'auto'
my Uploader:
# encoding: utf-8classItemSvgUploader < CarrierWave::Uploader::BaseifRails.env.production?includeCloudinary::CarrierWaveend# Override the directory where uploaded files will be stored.# This is a sensible default for uploaders that are meant to be mounted:defstore_dir"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"enddefextension_white_list%w(svg)enddefcache_dir"#{Rails.root}/tmp/uploads"enddefdefault_urlActionController::Base.helpers.asset_path(["nav-icon.png"].compact.join('_'))endend
Activity
TalLevAmi commentedon Aug 30, 2013
Your uploader looks fine. The Cloudinary media library currently doesn't show raw files.
You can use the Admin API to see you upload:
freezepl commentedon Aug 30, 2013
Thanks, it works!