Skip to main content
POST
Upload File

Overview

Upload a new file to your Hubsy Cloud storage. Supports multipart/form-data for file uploads.

Request Body

file
required
The file to upload (binary data)
string
ID of the folder to upload to. Omit to upload to root directory.
string
Custom filename (optional). If not provided, uses the original filename.
boolean
default:"false"
If true and a file with the same name exists, it will be overwritten. Otherwise, a new file with a numbered suffix is created.

Example Request

Response

boolean
Indicates if the upload was successful
object
Uploaded file information

Example Response

Error Responses

File Size Limits

Maximum file size varies by plan:

Upload Best Practices

For files larger than 100 MB:
  • Use chunked upload (coming soon)
  • Implement retry logic
  • Show progress to users
  • Handle network interruptions
Verify upload success:
  • Check response status code (200)
  • Verify success: true in response
  • Compare MD5 hash if critical
  • Store file ID for future reference
Handle common errors:
  • Storage exceeded → Notify user to upgrade
  • File too large → Compress or split file
  • Invalid folder → Verify folder exists
  • Rate limit → Implement exponential backoff

Notes

  • Supported file types: All types accepted
  • Files are scanned for viruses automatically
  • Duplicate filenames are handled based on overwrite parameter
  • Upload progress tracking available via chunked upload API (coming soon)
  • MD5 hash can be used to verify file integrity