使用RestClient上传服务器本地文件
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 #返回结果
使用RestClient上传服务器本地文件
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 #返回结果

2023-03-10
0万阅读

2023-03-10
0万阅读

2023-03-05
0万阅读

2023-03-03
0万阅读

2023-02-21
6万阅读

2023-02-12
9万阅读

2023-01-14
2万阅读

2023-01-07
2万阅读

2023-01-06
6万阅读

2023-01-04
2万阅读

2023-03-10
0万阅读

2023-03-10
0万阅读

2023-03-05
0万阅读

2023-03-03
0万阅读

2023-02-21
6万阅读

2023-02-12
9万阅读

2023-01-14
2万阅读

2023-01-07
2万阅读

2023-01-06
6万阅读

2023-01-04
2万阅读