This is an API endpoint to upload a file for sharing. It accepts files via Multipart Form Data. field name does not matter. It will return a JSON array of objects that contain the UID, an update token and the file name. The update token is used for replacing the original file at that UID.
CREATE
POST https://{server}/api/public/share
Example
curl -X POST -F "file=@text.txt" https://{server}/api/public/share
RESPONSE
[
{
"uid":"a3917284-abcd-efgh-jklm-ea8ed00b25eb",
"updateToken":"c1a71469-abcd-efgh-jklm-100f36224b45",
"file":"test.txt"
}
]
UPDATE
POST https://{server}/api/public/share/{uid}/{updateToken}
Exmaple
curl -X POST -F "file=@text_v2.txt" https://{server}/api/public/share/a3917284-abcd-efgh-jklm-ea8ed00b25eb/c1a71469-abcd-efgh-jklm-100f36224b45
RESPONSE
[
{
"uid":"a3917284-abcd-efgh-jklm-ea8ed00b25eb",
"updateToken":"c1a71469-abcd-efgh-jklm-100f36224b45",
"file":"test.txt"
}
]
DOWNLOAD
GET https://{server}/api/public/share/a3917284-abcd-efgh-jklm-ea8ed00b25eb
Example
curl https://{server}/api/public/share/a3917284-abcd-efgh-jklm-ea8ed00b25eb