简体   繁体   English

Rails载波和cloudinary多个文件上传

[英]Rails carrierwave and cloudinary multiple file uploads

So I'm trying to get carrierwave to work with cloudinary for multiple file uploads but it keeps giving me this error that says: 因此,我正在尝试使carrierwave与cloudinary一起使用以上传多个文件,但它一直给我以下错误提示:

undefined method `all_versions_processors' for Array 数组的未定义方法“ all_versions_processors”

I followed the carrierwave documentation where I added a listing_images attribute to my Listings table which is of type json. 我遵循了载波文档,在其中向json类型的Listings表添加了listing_images属性。

I also set the multiple to true option in the form file input. 我还在表单文件输入中将倍数设置为true选项。

And in my ListingsController I have specified as one of the permitted params the following: 在我的ListingsController中,我将以下内容指定为允许的参数之一:

listing_images: [] listing_images:[]

I'm pretty sure everything is configured properly but I can't figure out why this error is thrown. 我很确定所有配置都正确,但是我不知道为什么会引发此错误。 Any help would be greatly appreciated. 任何帮助将不胜感激。

It's on the road-map to officially support multiple uploads with Carrierwave on Cloudinary's GEM. 即将在Cloudinary的GEM上正式支持Carrierwave进行多次上传。 In the meantime, as a workaround, you can accomplish multiple uploads a bit differently. 同时,作为一种解决方法,您可以以不同的方式完成多个上传。 Here's a basic sample project that demonstrates it: https://github.com/taragano/Cloudinary_multiple_uploads 这是一个演示它的基本示例项目: https : //github.com/taragano/Cloudinary_multiple_uploads

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM