-
-
Notifications
You must be signed in to change notification settings - Fork 239
Upload
To allow uploads you need a folder that is actually on your disk, where the files will be stored.
Instructions
- go to Admin-panel > Shared files
- add a folder
- be sure it is bound to a folder on disk (the field is called Load content from disk)
- click on "Who can upload", and decide the policy you desire
Done! From now on, users with permission (decided by you on step 3) will see a button "upload" when they access such folder
It is possible to upload a file without using HFS' web interface.
At command line you can use curl -T FILE URL/
, where FILE is the path of the file you want to upload, and URL is the destination folder in HFS. It also works in this other way curl -F upload=@FILE URL/
.
From any programming language you can make an HTTP request. Using method PUT, the URL must include folder and filename, while the body will contain exactly the content of the file. If you want to use method POST, it will be treated as a form multipart. The URL must include the folder only, with final slash, the name of the field in the form is ignored, while the file name is read from Content-Disposition of the multipart.