Skip to content

Function: presignedUploader() ​

ts
function presignedUploader(options): UploadFn;

Upload straight to object storage (S3, R2, GCS…) with a presigned URL from your backend, then use the returned public URL. Reports progress.

Parameters ​

ParameterType
optionsPresignedUploaderOptions

Returns ​

UploadFn

Example ​

ts
imageUpload({
  upload: presignedUploader({
    getTarget: (file) => api.post('/images/sign', { type: file.type, size: file.size }),
  }),
})