uniapp WeChat applet development based on ali-oss direct file upload solution

uniapp WeChat applet development based on ali-oss direct file upload solution

1. Demand background
  • Recently, we are developing a WeChat applet based on uniapp. Since the upload and download services of all development projects in the company are based on the ali-oss service, the upload service in the WeChat applet project also needs to be based on ali-oss.
  • Introduction: Alibaba Cloud Object Storage OSS (Object Storage Service) is a massive, secure, low-cost, and highly reliable cloud storage service that can provide 99.9999999999% (12 nines) of data persistence and 99.995% of data availability. A variety of storage types are available to fully optimize storage costs. OSS has a platform-independent RESTful API interface, and you can store and access any type of data in any application, any time, and any place. You can use the API, SDK interface or OSS migration tool provided by Alibaba Cloud to easily move massive data into or out of Alibaba Cloud OSS. After data is stored in Alibaba Cloud OSS, you can choose standard storage (Standard) as the main storage method for mobile applications, large websites, picture sharing, or hot audio and video, or you can choose low-frequency access storage ( Infrequent Access), archive storage (Archive), and cold archive storage (Cold Archive) are used as storage methods for infrequently accessed data.
  • Features: Bucket owners can authorize different users to access specified OSS resources with what permissions through Bucket Policy. For example, you need to authorize cross-account or anonymous users to access or manage the entire Bucket or some resources in the Bucket, or you need to grant different permissions to access or manage Bucket resources to different RAM users under the same account, such as read-only, read-write, or Full Control permissions etc. This is also a troublesome place for developers, and there are many pitfalls in it.
2. Solutions

Guess you like

Origin blog.csdn.net/qq_34917408/article/details/127107563