code: function() {
          var key = this.formId;
  
          var formFields = this.formFields || [];
  
          //Iterating over all form fields
          for (var formFieldIdx = 0; formFieldIdx < formFields.length; formFieldIdx++) {
            var formField = formFields[formFieldIdx];
  
            var fieldValues = formField.fieldValues || [];
  
            //Iterating over all of the field values
            for (var fieldValueIdx = 0 ; fieldValueIdx < fieldValues.length ; fieldValueIdx++) {
              var fieldValue = fieldValues[fieldValueIdx] || {};
  
              //If the value has a file size associated with it, then emit that file size
              if (fieldValue.fileSize) {
                emit(key, fieldValue.fileSize); // eslint-disable-line no-undef
              }
            }
          }
        }
docs: NOTE: this function executes in MongoDB rather than Node.js Need a map-reduce operation to count the files, otherwise would have to load all submissions into memory which is bad.