node_modules/@adonisjs/bodyparser/src/Multipart/index.js
/**
   * Add a listener to file. It is important to attach a callback and
   * handle the processing of the file. Also only one listener can
   * be added at a given point of time, since 2 parties processing
   * a single file doesn't make much sense.
   *
   * @method file
   *
   * @param  {String}   name
   * @param  {Object}   options
   * @param  {Function} callback
   *
   * @chainable
   */
Add a listener to file. It is important to attach a callback and
handle the processing of the file. Also only one listener can
be added at a given point of time, since 2 parties processing
a single file doesn't make much sense.

@method file



@chainable
Add a listener to file . It is important to attach a callback and handle the processing of the file . Also only one listener can be added at a given point of time since 2 parties processing a single file doesn ' t make much sense . @method file @chainable
file (name, options = {}, callback) {
    debug('attached callback for %s file', name)
    if (typeof (callback) !== 'function') {
      throw GE.InvalidArgumentException.invalidParameter('multipart.file expects callback to be a function', callback)
    }
    if (name === '*') {
      this._wildcard = { options, callback }
    } else {
      this._filesToAccess[name] = { options, callback }
    }
    return this
  }
file ( name , options = { } , callback ) { debug ( 'attached callback for %s file' , name ) if ( typeof ( callback ) !== 'function' ) { throw GE . InvalidArgumentException . invalidParameter ( 'multipart.file expects callback to be a function' , callback ) } if ( name === '*' ) { this . _wildcard = { options , callback } } else { this . _filesToAccess [ name ] = { options , callback } } return this }
Add a listener to file.
Add a listener to file .