API Reference (hyper cloud)
Storage API
Upload an Object
7min
Adds an object to a storage service bucket using FormData
- appname - string - the name of your hyper cloud application.
- bucket - string- the name of your hyper cloud service.
When posting unstructured data to the storage service it is best to use a multipart/form-data Content-Type and the form-data should contain a file field. See the examples.
- file - represents the unstructured file for storage
- path - string - optional - contains additional path structure from bucket root. eg. if path equals directory1/directory2 then the object location will be /storage/bucket/directory1/directory2/hello.txt
ReadbleStream with hyper-connect on Node?
hyper-connect's storage.upload accepts a Web ReadableStream as input. Starting with Node 17, Node provides toWeb and fromWeb apis to converts NodeJS.ReadableStream to Web ReadableStream
Status | Description | Example |
201 | Created | {"ok": true} |
500 | Server Error | {"ok": false, "msg": "..."} |
Need Help?
You can always reach out to our support team for any additional assistance on slack.