Upload File/Object
Upload a file
This interface is used to upload files to the cess system. You need to submit the file as form data and use provide the specific field. If the upload is successful, you will get the fid of the file. If you want to encrypt your file, you can specify the cipher field in the header and enter your password (the length cannot exceed 32 characters), and the system will automatically encrypt it.
HTTP Interface:
PUT /file
Request Header:
key | description |
---|---|
Bucket | bucket name |
Territory | territory name |
Cipher(optional) | cipher |
Identity signature required: yes
Request Body:
The file is provided in the form.
key | value |
---|---|
file | file[binary] |
Request example:
Upload an object
This interface is used to upload an object, you can write what you want to store directly in the body instead of specifying a file. If the upload is successful, you will get the fid of the object. if you want to encrypt the object, you can specify the "Cipher" field in the header of the request and enter a password (the length can not be more than 32 characters), the system will encrypt it automatically.
HTTP Interface:
PUT /object
Request Header:
key | description |
---|---|
Bucket | bucket name |
Territory | territory name |
Cipher(optional) | cipher |
Identity signature required: yes
Request Body:
[content]
Request example:
Specify miner storage
The gateway supports you to store files on the specified miners. When the number of miners you specify is greater than 12, the gateway will randomly store them in the 12 miners you specify. When the number of miners you specify is less than 12, the gateway will store them in the miners you specify first, and then randomly store them in other miners.
The method to specify the storage miner is to specify it by filling in the header of Miner
in the upload interface. All upload interfaces support it.
The example is as follows:
Specify coordinate range storage
The gateway supports you to set a batch of longitude and latitude coordinate ranges for storage. The number of coordinates cannot be less than 3. The file will be randomly stored in the coordinate range you specify. Set a coordinate point by setting the Latitude and Longitude pair in the request header. Note: Please set the Latitude and Longitude coordinate points in order. All upload interfaces support it.
The example is as follows:
Last updated