我使用Carrierwave使用簡單的控制器將照片上傳到我的Rails應用程序: # POST /photos
# POST /photos.xml
def create
@photo = Photo.new(params[:photo])
respond_to do |format|
if @photo.save
format.h
我有一個CarrierWave :: Uploader,它可以生成上傳圖像的三個版本。 # Process files as they are uploaded:
process :resize_to_fit => [400, 400]
# Create different versions of your up