How to Upload Files to Alibaba Cloud Object Storage with Node.js
For you to follow through with this tutorial you will require the following:
- Subscribe to the Alibaba Cloud Object Storage Service to get secret access keys.
- Run Node.js and npm on your machine. Node.js Downloads contains further information on how to go about Node installation.
In summary, you will require an Alibaba Cloud account, Object Storage Service, Node.js, npm and access keys to your OSS service.
How to Add Access Keys to the Credentials File
npm install ali-oss
Noteworthy, there are two modes that you can choose from; synchronous and asynchronous modes.
To use in synchronous mode, you may additionally use it in conjunction with co. Install co like so:
npm install co
The asynchronous mode supports callback.
Then you can go to How to Use Node.js to Upload Files to Alibaba Cloud Object Storage to check how to initialize the Client, install dependencies, create the front-end App, set up server with express and then upload the files.
Related Blog Posts
By Alex Mungai Muchiri, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud’s incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.
In this tutorial, we will be examining the methods of routing using Node.js. Hopefully, you have already grasped the fundamental principles of Node.JS. We will be examining the essentials of Node.js routing using Express. Specifically, we will explore two methods and examples for the case study.
For most programming languages, routing is an essential component of programming techniques. Older routing applications were tedious and most cases prone to errors. However, modern programming languages use advanced methods that have made programming much easier to implement.
Related Market Products
There are some products with node.js built by partners can be quickly launched on Alibaba Cloud servers.
ParseServer is the open source version of the Parse backend, and related projects.Parse Server is an open source version of the Parse backend that can be deployed to any infrastructure that can run Node.js.Parse Server works with the Express web application framework. It can be added to existing web applications, or run by itself.
RealSight APM is a much easy to use and much powerful management platform for monitoring application health state, performance, cloud resources, user experience and relevant resources of applications running in cloud. It can help you to constantly monitoring your applications and release you from the cumbersome operation works.
The components of this Image
JDK1.6-node.js 0.8.23- PostgreSQL9.5.1-Tomcat6
There are some documentation may be useful to you.
This topic describes how to install Node.js. Demos in the official documents are based on SDK 6.X. For SDKs of earlier versions, see Document for 5.X SDK.
Currently, Function Compute supports the Node.js 6.10 (runtime version 6) and Node.js 8.9.0 (runtime version 8).
There are some products which can help you to optimize your experience on Node.js.
Alibaba Cloud Function Compute is an event-driven and fully-managed compute service. With Function Compute, you can quickly build any type of applications or services without considering management or O&M. You can complete a set of backend services for processing multimedia data even in several days.
An encrypted and secure cloud storage service which stores, processes and accesses massive amounts of data from anywhere in the world
We also have some courses to help you excel in the tools.
This course explains the basic concepts of OSS. It also includes demos such as bucket management, object storage operations, image processing, website hosting and monitoring and introduces the OSS related security features.
In this online course, you will learn how to configure Alibaba Cloud Function compute product using its embedded HTTP trigger, so that when request is sent to a particular URL, your predefined actions will be triggered automatically.