The below document provides examples on working the NodeChef S3 compatible object storage service. You can adopt the examples for your own use case how you see fit. The examples in this document assumes the user is using the express.js framework
Note the below example assumes the client made a POST request to your server and you want to upload the body of the request to the object storage service.
In the above example, "NewFile" is hardcoded as the name of the file and webPics is also hard coded as the name of your bucket. In your application, you will most likely want to change this as you will typically generate unique Ids for files uploaded to your server.
Also, the file_url we generated above is the public url of the file and will only work if anonymous is enabled on the bucket. You can enable this from the NodeChef dashboard.