The file data
OptionalfilenameOptional override for the file name (defaults to basename of path).
This is used to set the Content-Disposition header in upload requests.
OptionalcontentOptional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
This is used to set the Content-Type header in upload requests.
If not provided, the content type may be determined from the data itself.
File, Blob, or similar, the content type will be determined from the file itself, if the type is set.Content-Type: application/octet-stream instead.OptionalcontentOptional file size in bytes.
The content length is used to set the Content-Length header in upload requests.
If the content length is not provided and cannot be determined, the upload request will not include the Content-Length header, but will use Transfer-Encoding: chunked instead.
If not provided, the file size will be determined depending on the data type.
fs.ReadStream (createReadStream), the size will be determined from the file system.Buffer, ArrayBuffer, Uint8Array, Blob, File, or similar, the size will be determined from the data itself.Readable or ReadableStream, the size will not be determined.
A file-like object with metadata, used for uploading files.