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 {
1863
1863
path . join ( params . mpu_path , 'create_object_upload' )
1864
1864
) ;
1865
1865
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
+ }
1866
1869
const entries = await nb_native ( ) . fs . readdir ( fs_context , params . mpu_path ) ;
1867
1870
const multiparts = await Promise . all (
1868
1871
entries
@@ -1873,7 +1876,7 @@ class NamespaceFS {
1873
1876
const stat = await nb_native ( ) . fs . stat ( fs_context , part_path ) ;
1874
1877
return {
1875
1878
num,
1876
- size : stat . size ,
1879
+ size : Number ( stat . xattr [ XATTR_PART_SIZE ] ) ,
1877
1880
etag : this . _get_etag ( stat ) ,
1878
1881
last_modified : new Date ( stat . mtime ) ,
1879
1882
} ;
You can’t perform that action at this time.
0 commit comments