Getting an error when requesting new uploaded images #531
-
I've implemented the signed URL following the guide. Making a request to an image that was already in the bucket worked fine, but for new images I get the error: {"status":404,"code":"NoSuchKey","message":"The image dog.png does not exist or the request may not be base64 encoded properly."} I'm signing the URLs using python: import hashlib
import hmac
my_secret="mysecret"
path="/1000x1000/filters:format(jpeg)/dog.png"
secret_encode = my_secret.encode('utf-8')
path_encode = path.encode('utf-8')
signature = hmac.new(secret_encode, path_encode, digestmod=hashlib.sha256).hexdigest()
print(signature) When making a request to an already uploeaded image "cat.png" the request works fine, but after uploading the "dog.png" image, I get the error. The image is uploaded, so the "NoSuchKey" does not make sense. For the base64 message, I checked the log stream and found the log message "INFO Path is not base64 encoded.". In summary, my question is, do I have to do something when uploading new images? Am I doing something wrong here? Again, thanks for the support since my last two questions were answered. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The INFO message "Path is not base64 encoded" doesn't seem to indicate any problem since it appears on the succesfull requests as well. |
Beta Was this translation helpful? Give feedback.
-
After debugging the application, I found that the solution was pointing to a different bucket. |
Beta Was this translation helpful? Give feedback.
After debugging the application, I found that the solution was pointing to a different bucket.