Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to upload file with special character in filename #6

Open
coolxdude opened this issue Dec 11, 2019 · 0 comments
Open

Unable to upload file with special character in filename #6

coolxdude opened this issue Dec 11, 2019 · 0 comments

Comments

@coolxdude
Copy link

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);

    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: 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant