File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -180,19 +180,18 @@ class S3Adapter {
180
180
}
181
181
await this . createBucket ( ) ;
182
182
const command = new PutObjectCommand ( params ) ;
183
- const response = await this . _s3Client . send ( command ) ;
183
+ await this . _s3Client . send ( command ) ;
184
184
const endpoint = this . _endpoint || `https://${ this . _bucket } .s3.${ this . _region } .amazonaws.com` ;
185
185
const location = `${ endpoint } /${ params . Key } ` ;
186
186
187
187
let url ;
188
- if ( config && typeof config === 'object' && Object . keys ( config ) . length > 0 ) { // if config is passed, we can generate a presigned url here
188
+ if ( config ?. mount && config ?. applicationId ) { // if config has required properties for getFileLocation
189
189
url = await this . getFileLocation ( config , key_without_prefix ) ;
190
190
}
191
191
192
192
return {
193
193
location : location , // actual upload location, used for tests
194
194
name : key_without_prefix , // filename in storage, consistent with other adapters
195
- s3_response : response , // raw s3 response
196
195
...url ? { url : url } : { } // url (optionally presigned) or non-direct access url
197
196
} ;
198
197
}
Original file line number Diff line number Diff line change @@ -897,7 +897,6 @@ describe('S3Adapter tests', () => {
897
897
expect ( result ) . toEqual ( {
898
898
location : jasmine . any ( String ) ,
899
899
name : 'file.txt' ,
900
- s3_response : jasmine . any ( Object ) ,
901
900
url : 'https://presigned-url.com/file.txt'
902
901
} ) ;
903
902
} ) ;
@@ -914,7 +913,7 @@ describe('S3Adapter tests', () => {
914
913
915
914
await expectAsync (
916
915
s3 . createFile ( 'file.txt' , 'hello world' , 'text/utf8' , { } )
917
- ) . toBeRejectedWithError ( 'Generate key failed' ) ;
916
+ ) . toBeRejectedWith ( 'Generate key failed' ) ;
918
917
} ) ;
919
918
} ) ;
920
919
You can’t perform that action at this time.
0 commit comments