Skip to content

Commit 0d49875

Browse files
authored
fix: saveFile for photo share
1 parent 8c4de97 commit 0d49875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package/native-package/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ registerNativeHandlers({
154154
},
155155
saveFile: async ({ fileName, fromUrl }) => {
156156
try {
157-
const path = RNFS.DocumentDirectoryPath + '/' + fileName;
157+
const path = RNFS.CachesDirectoryPath + '/' + encodeURIComponent(fileName);
158158
await RNFS.downloadFile({ fromUrl, toFile: path }).promise;
159159
return 'file://' + path;
160160
} catch (error) {

0 commit comments

Comments
 (0)