Skip to content

Commit a27ea58

Browse files
committed
NC | list_mulitpart upload fixes
Signed-off-by: jackyalbo <[email protected]>
1 parent c22f40b commit a27ea58

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sdk/namespace_fs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,9 @@ class NamespaceFS {
18631863
path.join(params.mpu_path, 'create_object_upload')
18641864
);
18651865
const create_multipart_upload_params = JSON.parse(data.toString());
1866+
if (create_multipart_upload_params.key !== params.key) {
1867+
throw new S3Error(S3Error.NoSuchUpload);
1868+
}
18661869
const entries = await nb_native().fs.readdir(fs_context, params.mpu_path);
18671870
const multiparts = await Promise.all(
18681871
entries
@@ -1873,7 +1876,7 @@ class NamespaceFS {
18731876
const stat = await nb_native().fs.stat(fs_context, part_path);
18741877
return {
18751878
num,
1876-
size: stat.size,
1879+
size: Number(stat.xattr[XATTR_PART_SIZE]),
18771880
etag: this._get_etag(stat),
18781881
last_modified: new Date(stat.mtime),
18791882
};

0 commit comments

Comments
 (0)