Optionalqueryquery strings should go here instead of being part of the pathname.
moreover, it should not include the leading "?" query character, and boolean query keys should always be followed with an "=" equals sign
for instance, for the url "http://localhost:9000/default/temp/hello_world.txt?attributes&max-keys=20", the query string "attributes=&max-keys=20"
[!note]
amazon requires you to sort the query parameters by their key names, according to: link. so the s3 signer functions perform the query-parameter sorting automatically.
Optionalheadersadditional headers to include in your request. you can use these headers to overwrite some of the following default/computed header fields (which are required to be part of the final header):
"host": the domain name/host server (without the http uri scheme)."x-amz-date": the date and time the request was made (example: "20240920T000000Z").
also see the date field for setting a custom amazon formatted date and time."x-amz-content-sha256": the sha256 hash of the request's body.
since a GET request cannot have a body, this is the sha256 of and empty string during a get request (default).Optionaldateuse a custom date, based on what you provide:
number: use a specific epoch time in milliseconds. for example: 1726790400000 (this comes from new Date("2024-09-20T00:00:00Z").getTime())."now": use Date.now() as the time.string: use an amazon formatted string date. example: "20240920T000000Z".any of the value that you provide here is internally converted into an amazon formatted string date, which is required when signing.
Optionalservicename of the service being used. typically it is "s3"
Optionalmethodwhich http method will you be using?
Optionalregionwhat is the region of the server? for locally hosted minio, use the default value.
Optionalexpiresspecify how long, in seconds, the pre-signed url will be valid for.
Optionalschemespecify which url-scheme to use for the finalized url.
Optionalpayloaddon't attach a payload to your canonical presigned-url request, because they are meant to accept arbitrary payloads (unlike header-based singer, which can optionally use a signed payload).
configuration options for the s3PresignUrlV4 function. it has all of the options available to S3SignHeadersV4Config, in addition to a few more.