Cloud Storage provides cloud services and the SDK to help you quickly build your system.
Before using the Cloud Storage sdk, your server need support Java 8 and higher.
Before running the Cloud Storage sdk, you need to:
-
Enabling Cloud Storage.
-
Enter the storage instance name and select the default data processing location.
-
Config the BUCKET_NAME parameter in the ServerApi.java file.
-
Config Security Rules as Allow all, the code configuration is as follows:
agc.cloud.storage[ match: /{bucket}/{path=**} { allow read, write: if true; } ]
-
Download authentication credential file and Config the file name to File_NAME.
-
In IDEA, run the demo.java file to run the project.
Please refer to:https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-cloudstorage-introduction-0000001054847259
src\main\java\ServerApi.java
Auth Service Demo is licensed under the [Apache License, version 2.0] (http://www.apache.org/licenses/LICENSE-2.0).