0
def create
@asset = Asset.new(params[:asset])
respond_to do |format|
if params[:Filedata]
@asset = Asset.new :swf_uploaded_data => params[:Filedata]
@asset.user = current_user
@asset.save!
format.html { render :text => @asset.image.url(:thumb) }
format.xml { render :nothing => true }
else
if @asset.save
flash[:notice] = 'Created'
format.html { redirect_to(@asset) }
format.xml { render :xml => @asset, :status => :created, :location => @asset }
else
format.html { render :action => "new" }
format.xml { render :xml => @asset.errors, :status => :unprocessable_entity }
end
end
end
end
我正在用swfupload創建一個上傳狀態欄。在上傳結束時,我收到了一個406錯誤。swfupload 406不可接受的錯誤