Overview
The options object can be passed to both theS3M constructor and the s3m() helper function to configure upload behavior.
Upload Configuration
Size of each chunk in bytes. Default is 10MB (10 * 1024 * 1024).
Maximum number of chunks to upload concurrently. Higher values can speed up uploads but use more resources.
Maximum number of retry attempts for a failed chunk upload.
Whether to automatically complete the multipart upload after all chunks are uploaded.When set to
false, the upload method returns the parts array and upload_id without calling the complete endpoint, allowing you to manually complete the upload later.Progress Tracking
Callback function that receives upload progress updates.Parameters:
percent(number): Upload progress from 0 to 100
HTTP Configuration
Base URL for API requests. If not specified, requests use the current origin.
Custom headers to include in API requests to your Laravel backend.
Custom HTTP client to use instead of axios. Must implement the same interface as axios.
Additional axios configuration options to pass through to HTTP requests.
Custom Data
Additional data to send with the multipart upload requests. This data is merged with the request payload.Useful for passing metadata, user IDs, folder paths, or other custom fields to your Laravel backend.