嘗試實施應用auto_orient的進程後!我的圖片我收到此錯誤:Rails - Carrierwave進程拋出ArgumentError:此映像列表中沒有圖像
ArgumentError (no images in this image list):
app/uploaders/image_uploader.rb:36:in `fix_exif_rotation'
app/controllers/posts_controller.rb:12:in `create'
Carrierwave工作正常,沒有過程,但是當我嘗試添加處理後上傳圖片引發錯誤。具體的過程:
process :fix_exif_rotation
def fix_exif_rotation
manipulate! do |image|
image = image.auto_orient!
end
end
這裏是我的職位#創建:
def create
@user = User.find(current_user.id)
@post = @user.posts.create(params[:post].permit(:text, :image))
redirect_to user_path(@user)
end
你能也粘貼PARAMS – Viren
參數:{ 「UTF8」=> 「✓」, 「authenticity_token」=> 「/ UeJdkaHrOf3Uq6TW9Nqbqi + Or8fkW7bmTjGSOlFD6g =」, 「後」=> { 「文本」=> 「」,「 image「=>#,@ original_filename =」7.jpg「,@ content_type =」image/jpeg「, @ headers =「Content-Disposition:form-data; name = \」post [image] \「; filename = \」7.jpg \「\ r \ nContent-Type:image/jpeg \ r \ n」>}, 「提交」=>「發佈」} –
奇怪確實或顯示在載波像白名單和所有 – Viren