问题
In my team development environment, we are using sqlite3 which comes default in Rails.
However, carrierwave's implementation of multi files upload require database that supports array/json datatype.
Are there any workaround so that it will work on our development environment without installing other database such as postgres?
I'm following the instructions over here https://github.com/carrierwaveuploader/carrierwave#multiple-file-uploads
回答1:
The only possible workaround would be to create a separate model for the uploads:
class ImagesContainer
has_many :uploads
end
class Upload
mount_uploader :image, ImageUploader
belongs_to ImagesContainer
end
来源:https://stackoverflow.com/questions/30951168/workaround-for-carrierwave-multiple-file-upload-using-sqlite3-in-development