POST
/api/uploadFile Upload
Uploads a file and returns a shareable link. The request must be sent as multipart/form-data.
BODY PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
file | File | Required | The file to be uploaded. |
expiry | string | Optional | Expiration time. Can be 5m, 1h, 1d, or permanent. |
pin | string | Optional | A pin required only if expiry is set to permanent. |
EXAMPLE (CURL)
curl -X POST "https://s.delirius.site/api/upload" \
-F "file=@/path/to/your/file.png" \
-F "expiry=1d"GET
/api/deleteDelete File
Deletes an uploaded file by its ID. If the file is permanent (expired < 1), a valid pin parameter is required.
QUERY PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
id | string | Required | File ID or hash code returned when uploading the file. |
pin | string | Optional | Required only for permanent files. Must match server PIN environment variable. |
EXAMPLE (CURL)
curl -X GET "https://s.delirius.site/api/delete?id=abc123"
# Delete permanent file
curl -X GET "https://s.delirius.site/api/delete?id=FILE_ID&pin=YOUR_PIN"POST
/api/shortenURL Shortener
Shortens a long URL. The request must be sent as application/json.
BODY PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
url | string | Required | The long URL to be shortened. |
EXAMPLE (CURL)
curl -X POST "https://s.delirius.site/api/shorten" \
--header "Content-Type: application/json" \
--data-raw '{
"url": "https://a-very-long-and-complex-url.com/example"
}'