rn-fetch-blob icon indicating copy to clipboard operation
rn-fetch-blob copied to clipboard

How to save a file with a specific name

Open iremlopsum opened this issue 6 years ago • 3 comments

Hey,

I did not find a way how to define the name of the file when it's saved. Currently the file name is: RNFetchBlobTmp_id9vud7ckz1h2yhwr8377.MP4.

I would rather want to save the file with a name something like ${appName}_${date}_${id}.ext. I found that I can specify a path and name the file like that, but I don't really want to save this file in any other path than it's saved in at the moment.

What's the easiest solution for that?

My current code:

RNFetchBlob.config({ fileCache: true, appendExt: extension })
  .fetch('GET', file.url, {
    Authorization : `Bearer ${jwt}`,
  })
  .then(res => {
    // do stuff with the image
  })

iremlopsum avatar May 20 '19 12:05 iremlopsum

Any news on this?

Hristijan95 avatar Sep 29 '20 11:09 Hristijan95

Please Solve this problem

ghost avatar Oct 27 '22 13:10 ghost

Any solution or workaround for this?

beydogan avatar Jul 07 '23 13:07 beydogan