grape 图片api

2020-11-26 14:54

阅读:804

标签:des   class   code   c   http   int   

 desc "Update image"
  params do
    requires :id,:type =>String,:desc =>"ID."
    requires :image,:type =>Rack::Multipart::UploadedFile,:desc =>"Image file."end
  post :image do
    new_file =ActionDispatch::Http::UploadedFile.new(params[:image])
    object =SomeObject.find(params[:id])
    object.image = new_file
    object.save
  end


链接地址 http://stackoverflow.com/questions/14067163/uploading-file-with-grape-and-paperclip

grape 图片api,搜素材,soscw.com

grape 图片api

标签:des   class   code   c   http   int   

原文地址:http://www.cnblogs.com/qinyan20/p/3726103.html


评论


亲,登录后才可以留言!