fix upload 500 error

This commit is contained in:
yafeilee 2017-07-20 16:05:12 +08:00
parent 2f24cc14db
commit 2129ab60fb
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ class PhotosController < ApplicationController
def create
@photo = Photo.new(image: params["Filedata"])
@photo.save!
render :text=> md_url(@photo.image.url)
render :plain => md_url(@photo.image.url)
end
def md_url(url)