Upload With Form Data

Upload file with form data

To upload file with form data, send POST request to according URL:

https://api.appery.io/rest/1/db/files/<fileName>

X-Appery-Master-Key header may be specified instead of X-Appery-Session-Token, granting access to DB.

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" \
--form file=@<filePath> \
https://api.appery.io/rest/1/db/files/<fileName>
{
"filename":<serverFileName>,
"fileurl":<url>
}

...
"error":
        {
            "code": DBFF154,
            "description": <fileName> exceeds the maximum upload size of 2MB
        }