HFS 3
  1. Front-end
HFS 3
  • Introduction
  • Front-end
    • List files
      GET
    • Upload
      PUT
    • Upload
      POST
    • Delete
      DELETE
    • Create folder
      POST
  • Admin
    • misc
      • get config
      • set config
    • accounts
      • add account
      • update account
      • list accounts
      • delete account
      • list usernames
      • get account
      • list admins
      • safer update of the password
    • VFS
    • plugins
      • get plugin config
      • set plugin config
    • monitoring
    • log
  1. Front-end

Upload

POST
/{folder}
Front-end
Equivalent to curl -F upload=@FILE FOLDER/
The main difference with PUT is that POST requires multipart.
We suggest you to use PUT, as it's simpler.

Request

Path Params
folder
string 
required
The folder path where the file will be uploaded
Query Params
existing
string 
optional
if you want to force overwrite of an existing file, but you need permission
Example:
overwrite
Body Params multipart/form-data
upload
file 
required
The file to upload.

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost/?existing=overwrite' \
--form 'upload=@""'

Responses

🟢200File uploaded successfully
application/json
Body
object {0}
Example
{}
🟠400Bad request
Modified at 2024-05-11 06:45:45
Previous
Upload
Next
Delete
Built with