Generates an AWS Signature Version 4 presigned PUT URL for browser or
third-party uploads through B2's S3-compatible API.
This helper signs internally and does not pass the B2 application key to
runtime peer dependencies. A presigned PUT URL is a replayable bearer
credential for writing one key until expiry. Retried PUTs can create
duplicate B2 file versions when a response is lost after B2 stored the object.
Use unique keys or reconcile uploaded file IDs/checksums, and configure
lifecycle/version cleanup where duplicate versions must be removed
automatically. If contentType and contentLength are omitted, the holder
can choose any content type, including browser-executable types, and any size
accepted by B2; bind both values before handing URLs to untrusted uploaders
to limit financial-DoS and content-type smuggling risk.
Generates an AWS Signature Version 4 presigned PUT URL for browser or third-party uploads through B2's S3-compatible API.
This helper signs internally and does not pass the B2 application key to runtime peer dependencies. A presigned PUT URL is a replayable bearer credential for writing one key until expiry. Retried PUTs can create duplicate B2 file versions when a response is lost after B2 stored the object. Use unique keys or reconcile uploaded file IDs/checksums, and configure lifecycle/version cleanup where duplicate versions must be removed automatically. If
contentTypeandcontentLengthare omitted, the holder can choose any content type, including browser-executable types, and any size accepted by B2; bind both values before handing URLs to untrusted uploaders to limit financial-DoS and content-type smuggling risk.