vi我正在尝试使用从服务器端生成的签名网址从Android应用程序将文件上传到Amazon S3服务器,它在我们测试的亚马逊s3帐户上工作正常,但是对于新的真实帐户,它返回'Access Denied'
错误桶名。
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>my requestid</RequestId><HostId> my hostid </HostId></Error>
上传代码:
public void UploadObject(String signed_url ) throws IOException
{
HttpClient client = new DefaultHttpClient();
HttpPut post = new HttpPut(signed_url);
// uploading video file:
post.setEntity(new FileEntity(getMyVideoFile(), "video/mp4"));
HttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity();
String responseString = EntityUtils.toString(entity, "UTF-8");
}
它在两个帐户的ios中工作正常(从同一服务器端生成的签名网址),任何帮助将不胜感激。