cURL
curl --request POST \ --url https://api.example.com/files/upload \ --header 'Content-Type: application/json' \ --data ' { "folder_id": "<string>", "name": "<string>", "overwrite": true } '
{ "success": false, "error": { "code": "file_too_large", "message": "File exceeds maximum size limit for your plan", "details": { "file_size": 6000000000, "max_size": 5000000000, "plan": "pro" } } }
Upload a file to your Hubsy Cloud account
curl -X POST https://api.hubsy.cloud/v1/files/upload \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@/path/to/document.pdf" \ -F "folder_id=folder_123" \ -F "name=my-document.pdf"
Show File Object
image
video
audio
document
archive
other
null
{ "success": true, "data": { "id": "file_xyz789", "name": "my-document.pdf", "size": 2458624, "type": "application/pdf", "category": "document", "folder_id": "folder_123", "created_at": "2024-01-15T14:30:00Z", "modified_at": "2024-01-15T14:30:00Z", "thumbnail_url": "https://cdn.hubsy.cloud/thumbs/file_xyz789.jpg", "download_url": "https://cdn.hubsy.cloud/download/file_xyz789?token=abc123", "md5_hash": "5d41402abc4b2a76b9719d911017c592" } }
Large File Uploads
Verify Uploads
success: true
Error Handling
overwrite