v0.x

Updated at:

The JavaScript SDK v0.x for Drive and Photo Service (Developer Edition) provides API operations and guides for file storage, management, and sharing.

Title

Description

Getting Started

The official PDS JavaScript SDK for file operations and resource management, including Drive, Share, and Group. Compatible with browser and Node.js environments, it can be installed through npm for integration into Vue, React, or Node.js projects, enabling quick access to all PDS APIs.

PDSClient

The PDSClient class is the core of the PDS JavaScript SDK. Create an instance to call all PDS APIs. It requires configuration parameters such as token information and API destinations, and provides methods to set tokens, share tokens, and make basic API calls. Event listeners are supported for tasks like fault handling.

Token

Multiple methods to obtain tokens, including JWT quick integration, service account token retrieval, and token refresh.

Upload files

Methods for uploading files, including simple uploads and upload tasks. Supports progress listeners and status management.

Download files

Download files using the downloadFile and createDownloadTask methods, with progress listeners and resumable downloads from breakpoints.

Bucket

List all buckets using the listAllStores method. Available in hosted mode and requires admin or superadmin permissions.

Disks

Disk management features including checking remaining space, creating, updating, and deleting disks, and querying and searching for disk information. Available to Enterprise Edition users.

File operations

List, search, query, download, rename, copy, move, and batch-delete files. Also supports getting file download URLs, saving and retrieving file content, updating file information, creating folders, getting file information by path, and retrieving breadcrumb folder information.

Favorites

Synchronously get the list of favorite files and batch-update their status, such as adding or removing files from favorites.

Recycle bin

Empty the recycle bin and recover deleted files in batches.

File value-added services

Document preview and editing, audio and video transcoding, playback URL retrieval, and server-side file packaging. These services must be activated before use. After activation, you can preview and edit documents, get playback URLs for transcoded audio and video, and download packaged files.

File authorization

Query shared file lists, manage sharing records, add and remove file permissions, and get information about authorized members.

Share links

Create, cancel, and list share links. Supports anonymous retrieval of share information and tokens.

Sharing

Create, update, delete, and query shares in hosted mode. You can also list shares and view files shared with you.

Users

Create, list, query, update, delete, and search for users in hosted mode. Administrators and regular users can perform these operations.

Groups and members

Create, delete, update, query, list, and search for groups. You can also add or remove members, update member relationships, and query member information.