Node.js SDK
client.files
Learn how to upload and manage files with the VLM Run Node.js SDK
File Operations
The files
component of the VLM Run client provides methods for uploading and managing files.
Upload a File
Get a File
File Types
The SDK supports various file types including:
- Images (jpg, jpeg, png)
- Documents (pdf)
- Audio files (mp3, wav)
- Video files (mp4)
TypeScript Interfaces
Error Handling
Best Practices
-
File Size Limits
- Check file size before uploading
- Handle large files appropriately
-
File Types
- Verify file types before upload
- Use appropriate MIME types
-
Error Handling
- Implement proper error handling
- Handle both API and file system errors