New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS files missing or deleted after several minutes #237
Comments
same here, both on Android and iOS |
@pt9dat i solved this by moving the video file using react-native-filesystem, i suspect it's a temporary file so i moved it to the cache directory hope this helps |
@IvanCaceres thanks so much |
@IvanCaceres do you have some code to show. I would think that it is rather trivial, but the copyFile callback never triggers on Android. const folder = `${TemporaryDirectoryPath}/fileUpload/${Date.now()}`
const newPath = `${folder}/${file.name}`
console.warn('copying file from %s to', file.uri, newPath)
try {
await mkdir(folder, {
NSURLIsExcludedFromBackupKey: true,
})
console.warn('MKDIR DONE') // called
await copyFile(file.uri, newPath)
console.warn('COPY DONE') // never called
} catch (e) {
// never called
} |
Can we get a solution ?? |
On iOS, the solution is to use the Closing because the original issue is resolved. |
Acessing the file and filepath are working as intended initially but after a period of several minutes accessing the file again will result in the file not being found or missing.
This is on iOS. Could it be that because the files are in a temporary path /tmp/ they're being cleaned?
What would be the recommended solution here? Copying or moving the file to another directory?
The text was updated successfully, but these errors were encountered: