uploader 文件
def store_dir
#"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
"#{Rails.root}/../dfs/"
end
def extension_white_list
%w(jpg jpeg gif png)
end
def filename
if original_filename
uuid = UUIDTools::UUID.random_create.to_s
uuid_p = uuid.gsub('-','')
@name = file.extension+"/"+uuid_p[1,2]+"/"+uuid_p[4,2]+"/"+uuid_p[7,2]+"/"+uuid_p[10,22]+"."+file.extension
# current_path 是 Carrierwave 上传过程临时创建的一个文件,有时间标记,所以它将是唯一的
"#{@name}"
end
end