@@ -141,20 +141,20 @@ class S3Adapter {
141141 // For a given config object, filename, and data, store a file in S3
142142 // Returns a promise containing the S3 object creation response
143143 async createFile ( filename , data , contentType , options = { } , config = { } ) {
144- let key_without_prefix = filename ;
144+ let keyWithoutPrefix = filename ;
145145 if ( typeof this . _generateKey === 'function' ) {
146146 const candidate = this . _generateKey ( filename , contentType , options ) ;
147- key_without_prefix =
147+ keyWithoutPrefix =
148148 candidate && typeof candidate . then === 'function' ? await candidate : candidate ;
149- if ( typeof key_without_prefix !== 'string' || key_without_prefix . trim ( ) . length === 0 ) {
149+ if ( typeof keyWithoutPrefix !== 'string' || keyWithoutPrefix . trim ( ) . length === 0 ) {
150150 throw new Error ( 'generateKey must return a non-empty string' ) ;
151151 }
152- key_without_prefix = key_without_prefix . trim ( ) ;
152+ keyWithoutPrefix = keyWithoutPrefix . trim ( ) ;
153153 }
154154
155155 const params = {
156156 Bucket : this . _bucket ,
157- Key : this . _bucketPrefix + key_without_prefix ,
157+ Key : this . _bucketPrefix + keyWithoutPrefix ,
158158 Body : data ,
159159 } ;
160160
@@ -210,12 +210,12 @@ class S3Adapter {
210210
211211 let url ;
212212 if ( config ?. mount && config ?. applicationId ) { // if config has required properties for getFileLocation
213- url = await this . getFileLocation ( config , key_without_prefix ) ;
213+ url = await this . getFileLocation ( config , keyWithoutPrefix ) ;
214214 }
215215
216216 return {
217217 location : location , // actual upload location, used for tests
218- name : key_without_prefix , // filename in storage, consistent with other adapters
218+ name : keyWithoutPrefix , // filename in storage, consistent with other adapters
219219 ...url ? { url : url } : { } // url (optionally presigned) or non-direct access url
220220 } ;
221221 }
0 commit comments