_setMetadata(options) {
    let data = options.data;
    let type = options.type;
    let eTag = options.eTag;
    let acl = options.acl;
    let size = options.size;
    let mimeType = options.mimeType;
    let lastModified = options.lastModified;

    if (!data) {
      this._available = false;
    } else {
      if (typeof Blob !== "undefined" && data instanceof Blob) {
        mimeType = mimeType || data.type;
      } else if (type == 'data-url') {
        let match = data.match(/^data:(.+?)(;base64)?,.*$/);
        mimeType = mimeType || match[1];
      }

      this._data = data;
      this._type = type;
      this._size = size;

      this._mimeType = mimeType;
      this._acl = acl || this._acl || new Acl();
      this._available = true;
    }

    this._eTag = eTag || this._eTag;

    if (lastModified) {
      this._lastModified = new Date(lastModified);
    }
  }
/**
   * Validates and sets the file metadata based on the given options
   * @param {Object} options
   * @private
   */
Validates and sets the file metadata based on the given options
@param {Object} options
@private
Validates and sets the file metadata based on the given options @param { Object } options @private
_setMetadata(options) {
    let data = options.data;
    let type = options.type;
    let eTag = options.eTag;
    let acl = options.acl;
    let size = options.size;
    let mimeType = options.mimeType;
    let lastModified = options.lastModified;
    if (!data) {
      this._available = false;
    } else {
      if (typeof Blob !== "undefined" && data instanceof Blob) {
        mimeType = mimeType || data.type;
      } else if (type == 'data-url') {
        let match = data.match(/^data:(.+?)(;base64)?,.*$/);
        mimeType = mimeType || match[1];
      }
      this._data = data;
      this._type = type;
      this._size = size;
      this._mimeType = mimeType;
      this._acl = acl || this._acl || new Acl();
      this._available = true;
    }
    this._eTag = eTag || this._eTag;
    if (lastModified) {
      this._lastModified = new Date(lastModified);
    }
  }
_setMetadata ( options ) { let data = options . data ; let type = options . type ; let eTag = options . eTag ; let acl = options . acl ; let size = options . size ; let mimeType = options . mimeType ; let lastModified = options . lastModified ; if ( ! data ) { this . _available = false ; } else { if ( typeof Blob !== "undefined" && data instanceof Blob ) { mimeType = mimeType || data . type ; } else if ( type == 'data-url' ) { let match = data . match ( / ^data:(.+?)(;base64)?,.*$ / ) ; mimeType = mimeType || match [ 1 ] ; } this . _data = data ; this . _type = type ; this . _size = size ; this . _mimeType = mimeType ; this . _acl = acl || this . _acl || new Acl ( ) ; this . _available = true ; } this . _eTag = eTag || this . _eTag ; if ( lastModified ) { this . _lastModified = new Date ( lastModified ) ; } }
Validates and sets the file metadata based on the given options
 @param {Object} options
 @private
Validates and sets the file metadata based on the given options @param { Object } options @private