Skip to content

File sometimes empty when using fileCache: true #48

Open
@nkov

Description

@nkov

We use the library to retrieve authenticated images like this:

import RNFetchBlob from 'react-native-fetch-blob'

RNFetchBlob
  .config({ fileCache: true })
  .fetch('GET', url, { Authorization: `Bearer ${token}` })
  .then(res => {
      console.log('path: ', res.path())
  })

Usually this works fine but sometimes the path which is returned leads to a 0 byte file instead of the actual file (for the same URL). I have confirmed on the local filesystem with the simulator but this seems to be happening on physical devices as well.

Using version 0.10.8 on React/RN 16.2/0.53

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions