UploadFileArgs
type UploadFileArgs = {
file: Buffer | NodeJS.ReadableStream | string;
fileName?: string;
projectId?: string | null;
};
Arguments for uploading a file.
See
https://todoist.com/api/v1/docs#tag/Uploads/operation/upload_file_api_v1_uploads_post
Properties
file
file: Buffer | NodeJS.ReadableStream | string;
The file content to upload. Can be:
- Buffer: File content as a Buffer (requires fileName)
- ReadableStream: File content as a stream (requires fileName)
- string: Path to a file on the filesystem (fileName is optional, will be inferred from path)
fileName?
optional fileName: string;
The name of the file. Required for Buffer and Stream inputs. Optional for file path strings (will be inferred from the path if not provided).
projectId?
optional projectId: string | null;
The project ID to associate the upload with.