Type Alias UploadOptions

UploadOptions: {
    lifecycle?: StorageSettings;
    multipart?: MultipartOptions;
    onUploadProgress?: ((progress: UploadProgress) => void);
}

Options for uploading a file.

Type declaration

  • Optionallifecycle?: StorageSettings

    Custom lifecycle configuration for the uploaded file. This object will be sent as the X-Fal-Object-Lifecycle header.

  • Optionalmultipart?: MultipartOptions

    Tuning for the multipart path. Ignored for files under MULTIPART_THRESHOLD.

  • OptionalonUploadProgress?: ((progress: UploadProgress) => void)

    Called as the upload progresses. Single-shot uploads report once, on completion; multipart uploads report once per part. Anything thrown here is ignored so a listener cannot fail the upload.