File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,9 @@ export interface CopyOptions {
361
361
contentType ?: string ;
362
362
contentDisposition ?: string ;
363
363
destinationKmsKeyName ?: string ;
364
- metadata ?: FileMetadata ;
364
+ metadata ?: {
365
+ [ key : string ] : string | boolean | number | null ;
366
+ } ;
365
367
predefinedAcl ?: string ;
366
368
token ?: string ;
367
369
userProject ?: string ;
Original file line number Diff line number Diff line change @@ -545,12 +545,17 @@ describe('File', () => {
545
545
546
546
it ( 'should accept an options object' , done => {
547
547
const newFile = new File ( BUCKET , 'name' ) ;
548
+ const METADATA = {
549
+ metadataKey : 'metadataValue' ,
550
+ } ;
548
551
const options = {
549
552
option : true ,
553
+ metadata : METADATA ,
550
554
} ;
551
555
552
556
file . request = ( reqOpts : DecorateRequestOptions ) => {
553
557
assert . deepStrictEqual ( reqOpts . json , options ) ;
558
+ assert . strictEqual ( reqOpts . json . metadata , METADATA ) ;
554
559
done ( ) ;
555
560
} ;
556
561
You can’t perform that action at this time.
0 commit comments