-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Invalid value ... for parameter image_file_type #17
Comments
Thank you for reporting this issue. You can now upload images from remote URLs without file extensions. Cloudinary automatically detects the format of the image and returns in the upload's result a Cloudinary URL with the correct extension. Note that specifying 'transformation' on the upload API call, means that the original image is not stored in the cloud. Only the transformed version is stored ('avatar' in your example). Therefore, it is usually recommended to keep the original image and create transformed versions (e.g., avatar) either dynamically (using cl_image_tag) or eagerly (using the 'eager' parameter of the upload API). Please check if it works fine for you now. |
Everything works fine for me now. I don't need original image. On upload I'm transforming images to max width/height I need for my app and then create thumbs later using cl_image_tag. Thanks for the fix and note |
I am trying to upload txt files but it is givinig an error "Invalid value txt for parameter image_file_type". I am using cloudinary_gem with carrierwave. in my gemfile; gem 'carrierwave'
gem 'mini_magick'
gem 'cloudinary' and my uploader class; class DocumentUploader < CarrierWave::Uploader::Base
include Cloudinary::CarrierWave
def extension_white_list
%w(jpg jpeg gif png tiff pdf doc docx xls xlsx txt)
end
end I think, we must provide resource_type=raw option in class, but I could not find how to put this code in class, best regards from istanbul. |
Are you using the latest GEM? The current version of the gem uses resource_type=auto by default. |
Thanks for fast reply, as you say, I updated to last version and the problem solved. thanks again. |
I'm using latest version of your gem (1.0.22), and when I try to upload image without extension
i get RuntimeError
I tried with adding format option and it worked
But then I can't add named transformation as an option (it is ignored).
Transformation option when uploading image with extension works fine
This one also ignores transformation option
The text was updated successfully, but these errors were encountered: