Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在上传文件时为每个上传者指定不同的权限 - 例如照片附件是公开的,而系统上传文件附件是私有的,是否可以根据上传者进行设置?
只需让您的上传器类覆盖基类。我今天也把头发扯掉了.. :(这对我有用:
使用 Carrierwave 0.8.0 /app/uploaders/whatever_uploader.rb
class WhateverUploader < CarrierWave::Uploader::Base def fog_public true # or false end end