constructor(data:any, cType:any, defer:boolean) {
    super()
    cType = cType || {}
    this.cacheName = getBlobName()
    this.isRNFetchBlobPolyfill = true
    this.isDerived = defer
    this.type = cType.type || 'text/plain'
    log.verbose('Blob constructor called', 'mime', this.type, 'type', typeof data, 'length', data?  data.length:0)
    this._ref = blobCacheDir + this.cacheName
    let p = null
    if(!data)
      data = ''
    if(data.isRNFetchBlobPolyfill) {
      log.verbose('create Blob cache file from Blob object')
      let size = 0
      this._ref = String(data.getRNFetchBlobRef())
      let orgPath = this._ref

      p = fs.exists(orgPath)
            .then((exist) =>  {
              if(exist)
                return fs.writeFile(orgPath, data, 'uri')
                         .then((size) => Promise.resolve(size))
                         .catch((err) => {
                           throw `RNFetchBlob Blob file creation error, ${err}`
                         })
              else
                throw `could not create Blob from path ${orgPath}, file not exists`
            })
    }
    // process FormData
    else if(data instanceof FormData) {
      log.verbose('create Blob cache file from FormData', data)
      let boundary = `RNFetchBlob-${this.cacheName}-${Date.now()}`
      this.multipartBoundary = boundary
      let parts = data.getParts()
      let formArray = []
      if(!parts) {
        p = fs.writeFile(this._ref, '', 'utf8')
      }
      else {
        for(let i in parts) {
          formArray.push('\r\n--'+boundary+'\r\n')
          let part = parts[i]
          for(let j in part.headers) {
            formArray.push(j + ': ' +part.headers[j] + '\r\n')
          }
          formArray.push('\r\n')
          if(part.isRNFetchBlobPolyfill)
            formArray.push(part)
          else
            formArray.push(part.string)
        }
        log.verbose('FormData array', formArray)
        formArray.push('\r\n--'+boundary+'--\r\n')
        p = createMixedBlobData(this._ref, formArray)
      }
    }
    // if the data is a string starts with `RNFetchBlob-file://`, append the
    // Blob data from file path
    else if(typeof data === 'string' && data.startsWith('RNFetchBlob-file://')) {
      log.verbose('create Blob cache file from file path', data)
      // set this flag so that we know this blob is a wrapper of an existing file
      this._isReference = true
      this._ref = String(data).replace('RNFetchBlob-file://', '')
      let orgPath = this._ref
      if(defer)
        return
      else {
        p = fs.stat(orgPath)
              .then((stat) =>  {
                return Promise.resolve(stat.size)
              })
      }
    }
    // content from variable need create file
    else if(typeof data === 'string') {
      let encoding = 'utf8'
      let mime = String(this.type)
      // when content type contains application/octet* or *;base64, RNFetchBlob
      // fs will treat it as BASE64 encoded string binary data
      if(/(application\/octet|\;base64)/i.test(mime))
        encoding = 'base64'
      else
        data = data.toString()
      // create cache file
      this.type = String(this.type).replace(/;base64/ig, '')
      log.verbose('create Blob cache file from string', 'encode', encoding)
      p = fs.writeFile(this._ref, data, encoding)
            .then((size) => {
              return Promise.resolve(size)
            })

    }
    // TODO : ArrayBuffer support
    // else if (data instanceof ArrayBuffer ) {
    //
    // }
    // when input is an array of mixed data types, create a file cache
    else if(Array.isArray(data)) {
      log.verbose('create Blob cache file from mixed array', data)
      p = createMixedBlobData(this._ref, data)
    }
    else {
      data = data.toString()
      p = fs.writeFile(this._ref, data, 'utf8')
            .then((size) => Promise.resolve(size))
    }
    p && p.then((size) => {
      this.size = size
      this._invokeOnCreateEvent()
    })
    .catch((err) => {
      log.error('RNFetchBlob could not create Blob : '+ this._ref, err)
    })

  }
RNFetchBlob Blob polyfill, create a Blob directly from file path, BASE64
encoded data, and string. The conversion is done implicitly according to
given `mime`. However, the blob creation is asynchronously, to register
event `onCreated` is need to ensure the Blob is creadted.
@param  {any} data Content of Blob object
@param  {any} mime Content type settings of Blob object, `text/plain`
                   by default
@param  {boolean} defer When this argument set to `true`, blob constructor
                        will not invoke blob created event automatically.