@@ -850,7 +850,7 @@ Countly.Bulk = Bulk;
850850 user . custom = cc . truncateObject ( user . custom , Countly . maxKeyLength , Countly . maxValueSize , Countly . maxSegmentationValues , "user_details" ) ;
851851 var request = { user_details : JSON . stringify ( cc . getProperties ( user , props ) ) } ;
852852 if ( ! user . picture && user . picturePath ) {
853- cc . log ( cc . logLevelEnums . INFO , "user_details, Picture is not set but picturePath is set, will try to upload picture from path." ) ;
853+ cc . log ( cc . logLevelEnums . INFO , "user_details, Picture is not set but picturePath is set, will try to upload picture from path." ) ;
854854 request . picturePath = user . picturePath ;
855855 }
856856 toRequestQueue ( request ) ;
@@ -1658,16 +1658,22 @@ Countly.Bulk = Bulk;
16581658 var fileName = path . basename ( filePath ) ;
16591659 var ext = ( fileName . split ( '.' ) . pop ( ) || '' ) . toLowerCase ( ) ;
16601660 var contentType = 'application/octet-stream' ;
1661- if ( ext === 'png' ) contentType = 'image/png' ;
1662- else if ( ext === 'jpg' || ext === 'jpeg' ) contentType = 'image/jpeg' ;
1663- else if ( ext === 'gif' ) contentType = 'image/gif' ;
1661+ if ( ext === 'png' ) {
1662+ contentType = 'image/png' ;
1663+ } else if ( ext === 'jpg' || ext === 'jpeg' ) {
1664+ contentType = 'image/jpeg' ;
1665+ } else if ( ext === 'gif' ) {
1666+ contentType = 'image/gif' ;
1667+ }
16641668
16651669 var boundary = 'FormBoundary' + Math . random ( ) . toString ( 16 ) . slice ( 2 ) ;
16661670 var bodyParts = [ ] ;
16671671
16681672 for ( var p in params ) {
16691673 if ( ! Object . prototype . hasOwnProperty . call ( params , p ) ) continue ;
1670- if ( p === 'picturePath' ) continue ;
1674+ if ( p === 'picturePath' ) {
1675+ continue ;
1676+ }
16711677 var value = params [ p ] ;
16721678 bodyParts . push ( Buffer . from ( `--${ boundary } \r\n` ) ) ;
16731679 bodyParts . push ( Buffer . from ( `Content-Disposition: form-data; name="${ p } "\r\n\r\n` ) ) ;
@@ -1689,7 +1695,7 @@ Countly.Bulk = Bulk;
16891695 options . method = "POST" ;
16901696 options . path = api ;
16911697 options . headers = options . headers || { } ;
1692- options . headers [ 'Content-Type' ] = ' multipart/form-data; boundary=' + boundary ;
1698+ options . headers [ 'Content-Type' ] = ` multipart/form-data; boundary=${ boundary } ` ;
16931699 options . headers [ 'Content-Length' ] = data . length ;
16941700 }
16951701 catch ( e ) {
0 commit comments