File Manager API

Version 1.0

POST

/api/upload

Upload a single file

Parameters

{input_name}
Required. File to upload (max: 10MB; jpg, png, gif, webp, pdf, txt, csv, office docs, zip, mp3, mp4). The input name is used as the subfolder when no path is given
path
Optional. Subdirectory path for the file (letters, digits, _, - and spaces)

Headers

X-API-Key
Required. Project API key

Example

Request:

curl -X POST http://your-app.test/api/upload \
                    -H "X-API-Key: your-project-api-key" \
                    -F "[email protected]" \
                    -F "path=users"

Response:

{
    "message": "File uploaded successfully",
    "file": {
        "original_name": "image.jpg",
        "name": "9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg",
        "path": "project-name/users/9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg",
        "full_url": "http://your-app.test/storage/project-name/users/9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg"
    }
}
POST

/api/upload-multiple

Upload multiple files

Parameters

{input_name}[]
Required. Array of files to upload (max: 10MB each). The input name is used as the subfolder when no path is given
path
Optional. Subdirectory path for the files (letters, digits, _, - and spaces)

Headers

X-API-Key
Required. Project API key

Example

Request:

curl -X POST http://your-app.test/api/upload-multiple \
                    -H "X-API-Key: your-project-api-key" \
                    -F "documents[][email protected]" \
                    -F "documents[][email protected]" \
                    -F "path=contracts"

Response:

{
    "message": "Files uploaded successfully",
    "files": [
        {
            "original_name": "doc1.pdf",
            "name": "9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.pdf",
            "path": "project-name/contracts/9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.pdf",
            "full_url": "http://your-app.test/storage/project-name/contracts/9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.pdf"
        },
        {
            "original_name": "doc2.pdf",
            "name": "c41d0a2e-7b3f-4e8a-b1d2-6f9e0a7c3b54.pdf",
            "path": "project-name/contracts/c41d0a2e-7b3f-4e8a-b1d2-6f9e0a7c3b54.pdf",
            "full_url": "http://your-app.test/storage/project-name/contracts/c41d0a2e-7b3f-4e8a-b1d2-6f9e0a7c3b54.pdf"
        }
    ]
}
POST

/api/upload-multiple-compressed

Upload multiple files with image compression

Parameters

{input_name}[]
Required. Array of files to upload (max: 10MB each). The input name is used as the subfolder when no path is given
path
Optional. Subdirectory path for the files (letters, digits, _, - and spaces)
quality
Optional. Image compression quality (1-100, default: 80)
max_width
Optional. Maximum image width in pixels (min: 100, default: 2000)
max_height
Optional. Maximum image height in pixels (min: 100, default: 2000)

Headers

X-API-Key
Required. Project API key

Example

Request:

curl -X POST http://your-app.test/api/upload-multiple-compressed \
                    -H "X-API-Key: your-project-api-key" \
                    -F "photos[][email protected]" \
                    -F "photos[][email protected]" \
                    -F "photos[][email protected]" \
                    -F "path=gallery" \
                    -F "quality=75" \
                    -F "max_width=1600" \
                    -F "max_height=1600"

Response:

{
    "message": "Files processed successfully",
    "compressed_files": [
        {
            "original_name": "photo1.jpg",
            "name": "9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg",
            "path": "project-name/gallery/9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg",
            "full_url": "http://your-app.test/storage/project-name/gallery/9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg",
            "compressed": true,
            "dimensions": {
                "width": 1600,
                "height": 1200
            }
        }
    ],
    "skipped_files": [
        {
            "original_name": "document.pdf",
            "name": "e0f7a9b3-2c4d-4b6e-8f1a-3d5c7e9b1a20.pdf",
            "path": "project-name/gallery/e0f7a9b3-2c4d-4b6e-8f1a-3d5c7e9b1a20.pdf",
            "full_url": "http://your-app.test/storage/project-name/gallery/e0f7a9b3-2c4d-4b6e-8f1a-3d5c7e9b1a20.pdf",
            "reason": "Not an image file"
        }
    ]
}
GET

/api/files

List the project's uploaded files, newest first

Headers

X-API-Key
Required. Project API key

Example

Request:

curl http://your-app.test/api/files -H "X-API-Key: your-project-api-key"

Response:

{
    "files": [
        {
            "id": 1,
            "original_name": "image.jpg",
            "name": "9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg",
            "path": "project-name/users/9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg",
            "full_url": "https://your-app.test/storage/project-name/users/9b2f1c7e-4f6a-4a51-9a1e-2f0c5d3b8e71.jpg",
            "mime_type": "image/jpeg",
            "size": 48213,
            "uploaded_at": "2026-10-02T08:00:00.000000Z"
        }
    ]
}
DELETE

/api/files

Delete a file using either full URL or relative path

Parameters

path
Required. Either the full URL or relative path to the file

Headers

X-API-Key
Required. Project API key

Examples

Delete using relative path

curl -X DELETE http://your-app.test/api/files \
                        -H "X-API-Key: your-project-api-key" \
                        -H "Content-Type: application/json" \
                        -d '{"path": "project-name/users/file.jpg"}'

Delete using full URL

curl -X DELETE http://your-app.test/api/files \
                        -H "X-API-Key: your-project-api-key" \
                        -H "Content-Type: application/json" \
                        -d '{"path": "http://your-app.test/storage/project-name/users/file.jpg"}'