10min

Upload an Object

POST /{appname}/storage/{bucket}

Adds an object to a storage service bucket using FormData

Parameters

Path Parameters

  • appname - string - the name of your hyper cloud application.
  • bucket - string- the name of your hyper cloud service.

Request Body

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.

Form Data Fields

  • 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

Ease with hyper-connect?

Given a stream and filename, hyper-connect will handle creating the FormData on your behalf.

Example

Node.js
|

Responses

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.

ο»Ώ

Updated 29 Apr 2022
Did this page help?
Yes
No