You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
List Objects
List Unmerged Objects (Browser.js SDK)
Copy page
Download PDF
List Unmerged Objects (Browser.js SDK)
This interface is used to list unmerged objects in a bucket, that is, to enumerate multipart upload tasks.​
Notes​
  • To prevent your Volcengine account credentials (namely, AccessKey ID and AccessKey Secret) from being exposed in browser environments, it is strongly recommended that you perform TOS-related operations using temporary access credentials. For detailed instructions, please refer to Using STS Temporary AK/SK+Token to Access Volcengine TOS.​
  • The Endpoint is the access domain name for TOS external services. For information on Endpoints supported by TOS, please refer to Access Domain Endpoint.​
  • Before listing multipart upload tasks, you must have the tos:ListBucketMultipartUploads permission. For more information, please refer to IAM Policy Overview.​
Parameters​
​
Parameter​
Description​
delimiter​
Character used to group object names.​
encodingType​
Encode the returned content and specify the type of encoding.​
Default value: None​
maxUploads​
Returns the maximum number of multipart upload tasks. The default value is 1000.​
Value range: (0, 1000]​
prefix​
Specifies to list in-progress uploads only for those keys that begin with the specified prefix.​
keyMarker​
List the starting positions of multipart upload tasks. Objects are listed in alphabetical order after the specified start. This is typically the value of nextMarker returned by the previous request.​
uploadIDMarker​
Used in conjunction with keyMarker, this sets the return of the multipart upload task list to start from the value following the marker, sorted in lexicographical order. Obtain nextVersionIdMarker from the previous listing results.​
​
Sample Code​
Brief Enumeration​
The following code is used to list up to 10 unmerged multipart upload tasks in the specified storage bucket.​
​
<!DOCTYPE html>​
<html lang="en">​
<head>​
<meta charset="UTF-8" />​
<title>Document</title>​
</head>​
​
<body>​
<button id="upload">Upload</button>​
<input id="file" type="file" />​
<script src="https://tos-public.volccdn.com/obj/volc-tos-public/@volcengine/tos-sdk@latest/browser/tos.umd.production.min.js"></script>​
<script src="./const.js"></script>​
<script type="text/javascript">​
const client = new TOS({​
region: yourRegion,​
endpoint: yourEndpoint,​
accessKeyId: yourAccessKey,​
accessKeySecret: yourSecretKey,​
stsToken: yourSecurityToken,​
bucket: examplebucket,​
});​
​
const listMultipartUploads = async () => {​
const data = await client.listMultipartUploads({​
bucket: examplebucket,​
maxUploads: 10,​
});​
console.log('data', data.data);​
};​
​
listMultipartUploads();​
</script>​
</body>​
</html>​
​
List all unmerged shard tasks with the specified prefix​
The following code enumerates all unmerged multipart upload tasks under the specified bucket and prefix.​
​
<!DOCTYPE html>​
<html lang="en">​
<head>​
<meta charset="UTF-8" />​
<title>Document</title>​
</head>​
​
<body>​
<button id="upload">Upload</button>​
<input id="file" type="file" />​
<script src="https://tos-public.volccdn.com/obj/volc-tos-public/@volcengine/tos-sdk@latest/browser/tos.umd.production.min.js"></script>​
<script type="text/javascript">​
const client = new TOS({​
region: yourRegion,​
endpoint: yourEndpoint,​
accessKeyId: yourAccessKey,​
accessKeySecret: yourSecretKey,​
stsToken: yourSecurityToken,​
bucket: examplebucket,​
});​
​
const listMultipartUploads = async () => {​
const data = await client.listMultipartUploads({​
bucket: examplebucket,​
prefix: '000',​
});​
console.log('data', data.data);​
};​
​
listMultipartUploads();​
</script>​
</body>​
</html>​
​
List all multipart upload tasks​
The following code is used to list all unmerged multipart upload tasks for the specified bucket.​
​
<!DOCTYPE html>​
<html lang="en">​
<head>​
<meta charset="UTF-8" />​
<title>Document</title>​
</head>​
​
<body>​
<button id="upload">Upload</button>​
<input id="file" type="file" />​
<script src="https://tos-public.volccdn.com/obj/volc-tos-public/@volcengine/tos-sdk@latest/browser/tos.umd.production.min.js"></script>​
<script src="./const.js"></script>​
<script type="text/javascript">​
const client = new TOS({​
region: yourRegion,​
endpoint: yourEndpoint,​
accessKeyId: yourAccessKey,​
accessKeySecret: yourSecretKey,​
stsToken: yourSecurityToken,​
bucket: examplebucket,​
});​
​
const listMultipartUploads = async () => {​
const data = await client.listMultipartUploads({​
bucket: examplebucket,​
});​
console.log('data', data.data);​
};​
​
listMultipartUploads();​
</script>​
</body>​
</html>​
​
​
Last updated: 2025.09.22 18:55:46