Upload a File#
Puts a file into a given folder.
Endpoint#
PUT https://api.cloudplan.net/api/file/upload
Note
The file size limit is 100MB for this api function.
Request Header Parameters#
file_name
The name of the file. If a file with this name already exists the new file will automatically receive an appendix with a incremented count. (e.g. logo (1).png) TODO: how to do special chars and spaces
pfid
Id of the folder where the file should be put. See List all Root Directories and List Folder Content.
Note
File content is put in the request body.
Example with curl#
With this api function files can be easily uploaded from the console using curl.
example with curl#
curl https://api.cloudplan.net/api/file/upload -H "api-key: 695f8c0c345e8fabb88c57c9086b0b76" -H "file_name:logo.JPG" -H "pfid:6319C982C7C0D952BFAA7347D212E57D" --upload-file logo.JPG
{"org_file_cp_id":"","folder_cp_id":"6319C982C7C0D952BFAA7347D212E57D","foldername":"big_files","file_cp_id":"696E1590541E123F5CAF8D1AB76B9535","filename":"logo.JPG","filehash":"2cfbb94ec1f0e69c88fc489211eec34cfdc05d48ae3dc5c5b5ad89329835355e","result":true}