REST API for temporary media hosting with automatic expiration.
All protected endpoints require an API key. Send it via:
X-API-Key: YOUR_KEY (recommended)?key=YOUR_KEYmdk_707f12e52a1b57e3710069fcd7d6c68ccf14030fda9a1261
?api=uploadUpload a file directly (non-chunked). Max size depends on server's upload_max_filesize PHP setting.
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | Yes | The media file to upload |
expiration | String | No | 30m, 1h, or 24h (default) |
curl -X POST \
-H "X-API-Key: mdk_707f12e52a1b57e3710069fcd7d6c68ccf14030fda9a1261" \
-F "file=@photo.jpg" \
-F "expiration=1h" \
"https://www.media-drop.texaproject.com/index.php?api=upload"
Success Response:
{
"success": true,
"data": {
"filename": "file_668f2a1b3c4d5.jpg",
"url": "https://www.media-drop.texaproject.com/index.php/uploads/file_668f2a1b3c4d5.jpg",
"type": "image",
"size": 245678,
"expiration": "1h",
"expires_at": "2026-07-06T10:00:00+07:00"
},
"message": "Upload successful"
}
?api=upload_chunkUpload large files in chunks to bypass PHP upload limits. Send each chunk sequentially.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_chunk | File | Yes | The chunk data |
file_id | String | Yes | Unique session ID (alphanumeric) |
file_name | String | Yes | Original filename with extension |
chunk_index | Integer | Yes | Current chunk index (0-based) |
total_chunks | Integer | Yes | Total number of chunks |
expiration | String | No | 30m, 1h, or 24h (default) |
?api=filesGet all active (non-expired) files with their details.
curl -H "X-API-Key: mdk_707f12e52a1b57e3710069fcd7d6c68ccf14030fda9a1261" "https://www.media-drop.texaproject.com/index.php?api=files"
?api=file&id=FILENAMEGet details about a specific file including remaining time.
curl -H "X-API-Key: mdk_707f12e52a1b57e3710069fcd7d6c68ccf14030fda9a1261" "https://www.media-drop.texaproject.com/index.php?api=file&id=file_668f2a1b3c4d5.jpg"
?api=delete&id=FILENAMEDelete a file before its expiration. Also accepts POST method.
curl -X DELETE \
-H "X-API-Key: mdk_707f12e52a1b57e3710069fcd7d6c68ccf14030fda9a1261" \
"https://www.media-drop.texaproject.com/index.php?api=delete&id=file_668f2a1b3c4d5.jpg"
?api=status (Public)Health check endpoint. No authentication required.
curl "https://www.media-drop.texaproject.com/index.php?api=status"
All API responses include Access-Control-Allow-Origin: *. Preflight (OPTIONS) requests are handled automatically.
Errors return appropriate HTTP status codes with a JSON body:
{
"success": false,
"message": "Error description here",
"code": 401
}
| Code | Meaning |
|---|---|
400 | Bad Request — missing or invalid parameters |
401 | Unauthorized — invalid or missing API key |
404 | Not Found — file or endpoint not found |
405 | Method Not Allowed — wrong HTTP method |
500 | Internal Server Error |
Images: jpg, jpeg, png, gif, webp, bmp, tiff, svg, heic, heif, ico, psd
Videos: mp4, webm, avi, mov, mkv, flv, wmv, m4v, 3gp, ogv, mpeg, mpg, mts, m2ts