@@ -27,21 +27,24 @@ export class LocalProvider extends BaseProvider {
2727
2828 public async upload ( file : UploadedFile , key : string ) : Promise < any > {
2929 const filePath = process . platform === 'win32'
30- ? this . path ( key ) : this . path ( key ) . slice ( 1 ) ; // adjusting file path according to OS
30+ ? this . path ( key ) : this . path ( key ) . slice ( 1 ) // adjusting file path according to OS
3131
32- await fs . promises . mkdir ( path . dirname ( filePath ) , { recursive : true } ) ;
33- await fs . promises . rename ( file . path , filePath ) ;
32+ await fs . promises . mkdir ( path . dirname ( filePath ) , { recursive : true } )
33+ await fs . promises . rename ( file . path , filePath )
3434 }
3535
3636 public async delete ( key : string , bucket : string ) : Promise < any > {
37- await fs . promises . unlink ( process . platform === 'win32'
38- ? this . path ( key , bucket ) : this . path ( key , bucket ) . slice ( 1 ) ) ; // adjusting file path according to OS
37+ await fs . promises . unlink (
38+ process . platform === 'win32'
39+ ? this . path ( key , bucket )
40+ : this . path ( key , bucket ) . slice ( 1 ) ,
41+ ) // adjusting file path according to OS
3942 }
4043
4144 // eslint-disable-next-line class-methods-use-this
4245 public path ( key : string , bucket ?: string ) : string {
4346 // Windows doesn't requires the '/' in path, while UNIX system does
4447 return process . platform === 'win32' ? `${ path . join ( bucket || this . bucket , key ) } `
45- : `/${ path . join ( bucket || this . bucket , key ) } ` ;
48+ : `/${ path . join ( bucket || this . bucket , key ) } `
4649 }
4750}
0 commit comments