@@ -304,7 +304,7 @@ export class Storage extends Service {
304304
305305 const size = file . size ;
306306
307- const headers : { [ header : string ] : string } = {
307+ const apiHeaders : { [ header : string ] : string } = {
308308 'content-type' : 'multipart/form-data' ,
309309 } ;
310310
@@ -315,7 +315,7 @@ export class Storage extends Service {
315315
316316 if ( fileId != 'unique()' ) {
317317 try {
318- response = await this . client . call ( 'get' , apiPath + '/' + fileId , headers ) ;
318+ response = await this . client . call ( 'get' , apiPath + '/' + fileId , apiHeaders ) ;
319319 chunksUploaded = response . chunksUploaded ;
320320 } catch ( e ) {
321321 }
@@ -334,7 +334,7 @@ export class Storage extends Service {
334334 const end = start + currentPosition ;
335335
336336 if ( ! lastUpload || currentChunk !== 1 ) {
337- headers [ 'content-range' ] = 'bytes ' + start + '-' + end + '/' + size ;
337+ apiHeaders [ 'content-range' ] = 'bytes ' + start + '-' + end + '/' + size ;
338338 }
339339
340340 let uploadableChunkTrimmed : Uint8Array ;
@@ -349,12 +349,12 @@ export class Storage extends Service {
349349 }
350350
351351 if ( id ) {
352- headers [ 'x-appwrite-id' ] = id ;
352+ apiHeaders [ 'x-appwrite-id' ] = id ;
353353 }
354354
355355 payload [ 'file' ] = { type : 'file' , file : new File ( [ uploadableChunkTrimmed ] , file . filename ) , filename : file . filename } ;
356356
357- response = await this . client . call ( 'post' , apiPath , headers , payload ) ;
357+ response = await this . client . call ( 'post' , apiPath , apiHeaders , payload ) ;
358358
359359 if ( ! id ) {
360360 id = response [ '$id' ] ;
0 commit comments