rn-fetch-blob
rn-fetch-blob copied to clipboard
How to save a file with a specific name
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
})
Any news on this?
Please Solve this problem
Any solution or workaround for this?