weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
2.05k stars 200 forks source link

S3 source storage and complexe URL #430

Closed ofostier closed 2 months ago

ofostier commented 2 months ago

Hello, My image is accessible with this URL : https://koafer-image.s3.eu-west-3.amazonaws.com/9qy2jsskoRd8k-o0TZPCLQ.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAZI2LDG5VHOUVINAA%2F20240903%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20240903T130005Z&X-Amz-Expires=5000&X-Amz-Signature=77d3e5116d4b727a9587b7404dfbe668c4ad5a51b10d2b3241c694c29a4dfa5d&X-Amz-SignedHeaders=host&x-id=GetObject

But i'm unable to pass this URL to WSRV as an URL parameter

If you have a trick Cheer

kleisauke commented 2 months ago

Have you tried URL-encoding it? See:

If the URL includes a querystring, you'll need to ensure that it's properly URL-encoded, replacing ? with %3F and & with %26, respectively. https://wsrv.nl/docs/introduction.html#how-it-works

Note that the presigned S3 URL above now returns a 403 error, as it was only valid for 5000 seconds.

X-Amz-Date=20240903T130005Z
X-Amz-Expires=5000
ofostier commented 2 months ago

Thanks it work like a charm