File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments