Uploading Multipart Data

Uploading multipart data

To upload multiple files with form data, send POST request to the following URL:

https://api.appery.io/rest/1/db/files/

Example

cURL:

curl -X POST \
-H "X-Appery-Database-Id: 544a5cdfe4b03d005b6233b9" \
-H "X-Appery-Session-Token: 6fb9515d-82fd-43b3-9124-f0534dceca8e" \
-H "Content-Type: multipart/form-data" \
-F <fileName1>=@<filePath1> \
-F <fileName2>=@<filePath2> \
-F <fileName3>=@<filePath3> \
https://api.appery.io/rest/1/db/files/
[
    {"success":
    {
        "filename":"c2c638c1-2add-40da-bbd1-e1ff662093ce.firstFile.txt",
        "fileurl":"https://api.appery.io/rest/1/db/files/534fc8eee4b0790ac5d968fe/c2c638c1-2add-40da-bbd1-e1ff662093ce.firstFile.txt"
}},
{"success":
    {
        "filename":"c2c638c1-2add-40da-bbd1-e1ff662093ce.secondFile.txt",
        "fileurl":"https://api.appery.io/rest/1/db/files/534fc8eee4b0790ac5d968fe/c2c638c1-2add-40da-bbd1-e1ff662093ce.secondFile.txt"
    }},
{"error":
    {
        "code":"DBFM153",
        "description":"File contents should be provided"
    }}
]