我正在尝试通过POST请求将图像上传到亚马逊:
begin
RestClient.post('http://public.domain.com/',
{
:transfer => {
:key => s3_key,
:acl => s3_acl,
:content_type => s3_content_type,
:AWSAccessKeyId => s3_AWSAccessKeyId,
:policy => s3_policy,
:signature => s3_signature
},
:upload => {
:file => File.new('/tmp/uup_1114.png', 'rb')
}
})
rescue => e
render :text => e.response
end
作为回应我正在
InvalidArgument
POST requires exactly one file upload per request.
RubyOnRails,RestClient。