lib/send.js
function addFilesToData(IOD, IODOpts, apiType, form) {
	_.each(T.maybeToArray(IODOpts.files), function(file) {
		if (apiType === IOD.TYPES.JOB) {
			form.append(file.name, fs.createReadStream(file.path))
		}
		else form.append('file', fs.createReadStream(file))
	})
}
function addFilesToData(IOD, IODOpts, apiType, form) {
	_.each(T.maybeToArray(IODOpts.files), function(file) {
		if (apiType === IOD.TYPES.JOB) {
			form.append(file.name, fs.createReadStream(file.path))
		}
		else form.append('file', fs.createReadStream(file))
	})
}
function addFilesToData ( IOD , IODOpts , apiType , form ) { _ . each ( T . maybeToArray ( IODOpts . files ) , function ( file ) { if ( apiType === IOD . TYPES . JOB ) { form . append ( file . name , fs . createReadStream ( file . path ) ) } else form . append ( 'file' , fs . createReadStream ( file ) ) } ) }
Add files to FormData object.

Modifies `IODOpts` in place.

@param {IOD} IOD - IOD object
@param {Object} IODOpts - IOD options
@param {String} apiType - IOD request type
@param {FormData} form - FormData object
Add files to FormData object .