This topic describes how to use Photo and Drive Service (PDS) to build a cloud drive service that supports logon by using mobile numbers.
1. Activate PDS
Log on to the PDS console.
If PDS is not activated, activate it by following the instructions on the page.
After PDS is activated, click Authorize on the No Default Role page to grant PDS the permissions to access other Alibaba Cloud resources.
2. Create a domain
Create a domain that adopts the standard storage mode.
For Data Storage Mode, Standard Mode is used by default.
Enable the personal space, which is an initial drive.
Set the custom size of the personal space to 10 GB. The system automatically allocates 10 GB of drive space to each new user.
Click OK.
3. Configure a logon method
After the domain is created, you must configure a user system for this domain to facilitate logon.
You can use a user system provided by PDS or an existing custom user system.
The user systems provided by PDS support the following logon methods: mobile number, DingTalk QR code, and RAM user account. For a custom user system, you can use JSON Web Token (JWT) to access PDS.
In this example, mobile numbers are used as the logon method.
To enable DingTalk-based logon, you must obtain the corresponding AppID and AppSecret. For more information, see Logon with DingTalk.
4. Use BasicUI that is provided by PDS
Users access the resources of the domain by using applications. You can create an application and configure the application to access the resources of the domain by calling PDS API operations. You can also use an official application provided by PDS to access the resources of the domain.
BasicUI is a web-based out-of-the-box cloud drive application provided by PDS. BasicUI supports basic file management features, such as upload, download, copy, move, deletion, and renaming. You can have a cloud drive system and a desktop client within a few clicks.
5. Manage BasicUI
On the domain details page, find the BasicUI application and click Manage.
You are redirected to BasicUI. The first visit takes a longer period of time because of data synchronization.
You can modify the BasicUI configurations based on your business requirements.
Logon with mobile numbers
After you create a domain, go to the domain details page. On the User Systems tab, click Configure. In the Configure PDS Logon Page panel, turn on Mobile Number to enable mobile number-based logon.
If you turn on Enable Whitelist Logon, only the mobile numbers that are added to the whitelist can be used to log on to applications.
If you turn off Enable Whitelist Logon, all mobile numbers can be used to log on to applications.
Go to the Applications tab. Find BasicUI and click Manage.
In the BasicUI admin console, go to the Team Management page. Click New User or Import User and specify the name and mobile number of the new user as the logon account.
After the new user is added, the new user can use a verification code that is sent to the mobile number to log on to the cloud drive.
6. Make the service available to users
The URL of your cloud drive service is in the format of https://{domainId}.apps.aliyunpds.com
. Replace the domainId variable with the ID of the domain.
You can obtain the domain ID on the domain details page, as shown in the following figure.
Now, users can visit the URL and log on to the cloud drive service by scanning DingTalk QR codes.
For more information, see User Guide.