I’m trying to upload a tiny pptx using UploadFileRequest (PHP SDK). I can upload successfully to the top level of my storage, but when I use a path name I get “AmazonS3 Storage exception: The request signature we calculated does not match the signature you provided. Check your key and signing method.” error.
Request
PUT: https://api.aspose.cloud/v3.0/slides/storage/file/splits%2Ftemplate.pptx?
x-aspose-client: php sdk
x-aspose-client-version: 19.6.0
Accept: application/json
Content-Type: multipart/form-data
Authorization: Bearer deletedID
Body: Resource id #29
Result
Response: 200
Date: Thu, 18 Jul 2019 21:51:00 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: Kestrel
Strict-Transport-Security: max-age=2592000
Body: {
"uploaded": [],
"errors": [
{
"code": "errorAmazonS3Storage",
"message": "AmazonS3 Storage exception: The request signature we calculated does not match the signature you provided. Check your key and signing method.",
"description": "Operation Failed. The remote server returned an error: (403) Forbidden.",
"innerError": {
"requestId": "Root=1-5d30e9c4-490e1618fd89c6e2bc0d9f64",
"date": "1970-01-01T00:00:00+00:00"
}
}
]
}
Looking at the API usage detail, I see “Success: UploadFile. Parameters: path ‘santander%2Ftemplate.pptx’.” (but the file isn’t being loaded)
If I just try putting without the directory name (PUT: https://api.aspose.cloud/v3.0/slides/storage/file/template.pptx?
) it works fine.
What am I missing? I’ve confirmed that the file is not in the directory, and I tried it on two different directories to make sure that wasn’t the issue.