JetS3t (pronounced "jet-set") is a free, open-source Java toolkit and application suite for Amazon Simple Storage Service (Amazon S3), Amazon CloudFront content delivery network, and Google Storage for Developers.
Apache License 2.0
26
stars
13
forks
source link
Unable to upload file with special character in filename #6
I am trying to upload a file with the file name having special characters using jets3t 0.9.4 jar. It fails with error "SignatureDoesNotMatch".
`
AWSCredentials awsCredentials = new AWSCredentials(accessKey, secretKey);
RestS3Service s3Service = new RestS3Service(awsCredentials);
S3Bucket[] myBuckets = s3Service.listAllBuckets();
for (int i = 0; i < myBuckets.length; i++) {
//System.out.println(myBuckets[i].getName());
}
StorageObject object = new StorageObject("test@t.txt");
StorageObject obj = s3Service.putObject("testbucket", object);
System.out.println(obj.toString());`
Exception:
Exception in thread "main" org.jets3t.service.ServiceException: Service Error Message. -- ResponseCode: 403, ResponseStatus: Forbidden, XML Error Message: <?xml version="1.0" encoding="UTF-8"?>SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:409)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:279)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRestPut(RestStorageService.java:1157)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.createObjectImpl(RestStorageService.java:1968)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.putObjectWithRequestEntityImpl(RestStorageService.java:1889)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.putObjectImpl(RestStorageService.java:1881)
at org.jets3t.service.StorageService.putObject(StorageService.java:840)
Hello,
I am trying to upload a file with the file name having special characters using jets3t 0.9.4 jar. It fails with error "SignatureDoesNotMatch". ` AWSCredentials awsCredentials = new AWSCredentials(accessKey, secretKey); RestS3Service s3Service = new RestS3Service(awsCredentials);
Exception: Exception in thread "main" org.jets3t.service.ServiceException: Service Error Message. -- ResponseCode: 403, ResponseStatus: Forbidden, XML Error Message: <?xml version="1.0" encoding="UTF-8"?>The request signature we calculated does not match the signature you provided. Check your key and signing method.
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:409)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:279)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRestPut(RestStorageService.java:1157)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.createObjectImpl(RestStorageService.java:1968)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.putObjectWithRequestEntityImpl(RestStorageService.java:1889)
at org.jets3t.service.impl.rest.httpclient.RestStorageService.putObjectImpl(RestStorageService.java:1881)
at org.jets3t.service.StorageService.putObject(StorageService.java:840)
SignatureDoesNotMatch