Skip to content

Commit 4e1c34d

Browse files
authored
fix: saveFile for share photo
1 parent 0d49875 commit 4e1c34d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package/expo-package/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ registerNativeHandlers({
123123
},
124124
saveFile: async ({ fileName, fromUrl }) => {
125125
try {
126-
const path = FileSystem.documentDirectory + fileName;
126+
const path = FileSystem.cacheDirectory + encodeURIComponent(fileName);
127127
const downloadedImage = await FileSystem.downloadAsync(fromUrl, path);
128128
return downloadedImage.uri;
129129
} catch (error) {

0 commit comments

Comments
 (0)