Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mjc's avatar
Level 3

Storage::temporaryUrl with query string

Is there a way to pass a query string along with the path and file? For example:

Storage::disk('s3')->temporaryUrl('content/myfile.jpg?userName=john', now()->addMinutes(30));

At the moment this results in a NoSuchKey errror. Other permutations I've tried produce a SignatureDoesNotMatch error.

I believe the query string needs to be passed using Amazon meta-headers so it will be incorporated in the expected signature but I can't see a way to do this.

0 likes
0 replies

Please or to participate in this conversation.