Upload File

Upload a file to storage

POSThttps://api.jamdesk.com/api/v1/files

Uploads a file to storage using multipart form data.

Form Fields

filebinaryrequired

The file to upload.

pathstring

Custom storage path.

publicboolean

Make publicly accessible.

curl -X POST "https://api.example.com/v1/files" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@/path/to/image.png" \
  -F "path=uploads/images" \
  -F "public=true"
{
  "data": {
    "id": "file_xyz",
    "name": "image.png",
    "size": 102400,
    "mimeType": "image/png",
    "url": "https://cdn.example.com/files/image.png",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}