Upload a file
client.files.upload(FileUploadParams { file } body, RequestOptionsoptions?): File { id, content_type, created_at, 3 more }
POST/v1/files
Upload an Excel spreadsheet file for later processing.
Supported formats:
- Excel (.xlsx)
Maximum file size: 100 MB
Parameters
Returns
Upload a file
import DeepTable from '@deeptable/deeptable';
const client = new DeepTable({
apiKey: process.env['DEEPTABLE_API_KEY'], // This is the default and can be omitted
});
const file = await client.files.upload({ file: fs.createReadStream('path/to/file') });
console.log(file.id);{
"id": "file_01abc2def3ghjkmnpqrs4uvwxy",
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"created_at": "2024-01-15T10:30:00Z",
"file_name": "financial_report.xlsx",
"size": 1048576,
"object": "file"
}Returns Examples
{
"id": "file_01abc2def3ghjkmnpqrs4uvwxy",
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"created_at": "2024-01-15T10:30:00Z",
"file_name": "financial_report.xlsx",
"size": 1048576,
"object": "file"
}