Skip to main content

The TempFileService service exposes the following operations:

  • create: to create a temporary file
  • getContent: to retrieve a temporary file
  • delete: to delete a temporary file

Creating a temporary file

The following examples show how to create a temporary file.


CREATE:

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token

curl -X POST "<CORE_HOST>/rest/files/tmp" \
-H "token: <TOKEN>" \
-F "file=@/path/to/file"

Recovering a temporary file

The following examples show how to recover a temporary file.


GET CONTENT:

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
# <FILE_ID> identifier of the temporary file

curl -X GET "<CORE_HOST>/rest/files/tmp/<FILE_ID>" \
-H "token: <TOKEN>"

Deleting a temporary file

The following examples show how to delete a temporary file.


DELETE :

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
# <FILE_ID> identifier of the temporary file

curl -X DELETE "<CORE_HOST>/rest/files/tmp/<FILE_ID>" \
-H "token: <TOKEN>"