我在Carriwave / Cloudinary上遇到问题
由于在管理空间中我为文章添加了图像,所以问题是当我上传该图像时出现此错误。
我在Windows上,我使用Windows的命令行ubuntu可以从中得到吗?
这是我的代码在这里
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
答案 0 :(得分:0)
Cloudinary似乎有问题。 解决方法请参阅: https://github.com/cloudinary/cloudinary_gem/issues/322
当问题已解决但尚无预计到达时间时,我们将在这里更新您的信息。