我有Carriwave / Cloudinary的问题
因为管理空间我为文章添加了一个图像问题是当我上传它时我有这个错误 .
我在Windows上我使用命令行ubuntu for windows它可以来自那个吗?
这是我的代码
管理员中的post.rb
ActiveAdmin.register Post do
permit_params :title, :content, :photo
index do
selectable_column
id_column
column "titre", :title
column "Contenu", :content
column "Création", :created_at
column "Editer", :updated_at
actions
end
form do |f|
f.inputs do
f.input :title, required: true, hint: 'Merci d\'ajouter un titre'
f.input :content, :class => "tinymce", :rows => 40, :cols => 120, required: true
f.input :photo, required: true, hint: 'Photo obligatoire'
actions
end
end
end
photo_uploader.rb
class PhotoUploader < CarrierWave::Uploader::Base
include Cloudinary::CarrierWave
version :large do
process resize_to_fill: [350,200]
end
version :standard do
process resize_to_fill: [250,200, :north]
end
version :thumb do
process resize_to_fit: [50,50]
end
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
process resize_to_fit: [200, 200]
def extension_whitelist
%w(jpg jpeg gif png)
end
end
post.rb
has_many :comments
mount_uploader :photo, PhotoUploader
1 回答
这似乎是Cloudinary的一个问题 . 作为解决方法,请参阅:https://github.com/cloudinary/cloudinary_gem/issues/322
我们将在此处更新您的问题,但尚未确定ETA .