FileZone API Documentation
File Upload Endpoint
This endpoint allows you to upload files to FileZone.
Endpoint
POST https://filezone-api.caliph.dev/upload
Request
The request should be a multipart/form-data POST request with the file in the 'file' field.
Response
The server will respond with a JSON object containing the upload details:
{
"status": true,
"result": {
"originalname": "example.jpg",
"encoding": "7bit",
"mimetype": "image/jpeg",
"filesize": "1.5 MB",
"expired": 1624012345678,
"expiredFmt": "12:34:56 18/06/2023",
"url": "https://filezone.caliph.dev/d/abcdefghijklmnop",
"url_file": "https://filezone-cdn.caliph.dev/file/example.jpg"
}
}
Rate Limiting
The API is rate-limited to 40 requests per minute per IP address. If you exceed this limit, you'll receive a 429 Too Many Requests response.
Error Handling
In case of an error, the server will respond with an appropriate status code and a JSON object containing an error message:
{
"status": false,
"message": "Error message here"
}
Example Usage
Here's an example of how to use the API with cURL:
curl -X POST -H "Content-Type: multipart/form-data" \
-F "file=@/path/to/your/file.jpg" \
https://filezone-api.caliph.dev/upload