Get the code
by Steve Bollers, Olaph Wagoner | Updated September 26, 2018 - Published September 25, 2018
CloudObject StoragePlatform as a ServiceWeb development
To illustrate object storage options in the cloud, you can use a code pattern to build a simple web gallery application that frees up storage space on your hard drive and moves all photos to the cloud.
The Web Gallery in Cloud Oject Storage is a simple Node.js app running on IBM Cloud that uses the Express framework to create a basic two tier web app that can pull data from and push data to Cloud Object Storage using a simple web form. See Tutorial: Image Gallery.
At the heart of the server side app is the Node.js IBM Cloud Object Storage SDK package, which handles the authentication and connectivity to Cloud Object Storage. Express handles the routing, which then allows the business logic to be handled by the controller. The upload form uploads an image to an express route, which calls functions from the IBM Cloud Oject Storage SDK, multer, and multer-s3 functions to upload it to the designated Cloud Object Storage bucket. A request for the image gallery view invokes Cloud Object Storage SDK functions to get the URL for each image in the bucket. The URL data is sent back in the response and merged with the EJS view template during the view rendering.
When you use this code pattern, you learn how to complete the following tasks:
Find detailed technical steps for this code pattern in the README.md file in the GitHub repository.
May 16, 2019
API ManagementArtificial intelligence+
April 13, 2019
April 12, 2019
Back to top