contactsPane.js
function (files) {
        for (var i = 0; i < files.length; i++) {
          let f = files[i]
          console.log(' meeting: Filename: ' + f.name + ', type: ' + (f.type || 'n/a') +
            ' size: ' + f.size + ' bytes, last modified: ' +
            (f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a')
          ) // See e.g. https://www.html5rocks.com/en/tutorials/file/dndfiles/

          // @@ Add: progress bar(s)
          var reader = new FileReader()
          reader.onload = (function (theFile) {
            return function (e) {
              var data = e.target.result
              console.log(' File read byteLength : ' + data.byteLength)
              var filename = encodeURIComponent(theFile.name)
              var contentType = theFile.type
              uploadFileToContact(filename, contentType, data)
            }
          })(f)
          reader.readAsArrayBuffer(f)
        }
      }
function (files) {
        for (var i = 0; i < files.length; i++) {
          let f = files[i]
          console.log(' meeting: Filename: ' + f.name + ', type: ' + (f.type || 'n/a') +
            ' size: ' + f.size + ' bytes, last modified: ' +
            (f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a')
          ) // See e.g. https://www.html5rocks.com/en/tutorials/file/dndfiles/

          // @@ Add: progress bar(s)
          var reader = new FileReader()
          reader.onload = (function (theFile) {
            return function (e) {
              var data = e.target.result
              console.log(' File read byteLength : ' + data.byteLength)
              var filename = encodeURIComponent(theFile.name)
              var contentType = theFile.type
              uploadFileToContact(filename, contentType, data)
            }
          })(f)
          reader.readAsArrayBuffer(f)
        }
      }
function ( files ) { for ( var i = 0 ; i < files . length ; i ++ ) { let f = files [ i ] console . log ( ' meeting: Filename: ' + f . name + ', type: ' + ( f . type || 'n/a' ) + ' size: ' + f . size + ' bytes, last modified: ' + ( f . lastModifiedDate ? f . lastModifiedDate . toLocaleDateString ( ) : 'n/a' ) ) // See e.g. https://www.html5rocks.com/en/tutorials/file/dndfiles/ // @@ Add: progress bar(s) var reader = new FileReader ( ) reader . onload = ( function ( theFile ) { return function ( e ) { var data = e . target . result console . log ( ' File read byteLength : ' + data . byteLength ) var filename = encodeURIComponent ( theFile . name ) var contentType = theFile . type uploadFileToContact ( filename , contentType , data ) } } ) ( f ) reader . readAsArrayBuffer ( f ) } }
Drop an image file to set up the mugshot
Drop an image file to set up the mugshot