File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/modules/identity/services Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -360,12 +360,16 @@ export class TeamService {
360360
361361 let team ;
362362 if ( image ) {
363- if ( ! isImageBuffer ( image . buffer ) ) {
364- throw new BadRequestException ( "Uploaded file is not a valid image" ) ;
363+ if ( image . size > 0 ) {
364+ if ( ! isImageBuffer ( image . buffer ) ) {
365+ throw new BadRequestException ( "Uploaded file is not a valid image" ) ;
366+ }
365367 }
366368 await this . isImageSizeValid ( image . size ) ;
367369 const dataBuffer = image . buffer ;
368- await this . isImageDimensionValid ( dataBuffer ) ;
370+ if ( image . size > 0 ) {
371+ await this . isImageDimensionValid ( dataBuffer ) ;
372+ }
369373 const dataString = dataBuffer . toString ( "base64" ) ;
370374 const logo = {
371375 bufferString : dataString ,
You can’t perform that action at this time.
0 commit comments