服务器本地文件上传

2014-12-04 0 292
服务器本地文件上传
url = 'http://xx' #post到url
field_hash = {key: key, token: token}  #post数据
request = RestClient.post url, field_hash.merge(file: File.new(File.join('public', "#{params[:logo]}"), 'rb'))  #上传文件
          
reponse = request.to_s #返回结果

遇见资源网 ruby 服务器本地文件上传 http://www.ox520.com/16184.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务