forked from joltup/rn-fetch-blob
-
-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Description
Hello all,
I am facing next issue with react-native-blob-util : If you provide link to the file that doesn't exist 404 error will be thrown and in catch block despite calling fs.unlink() broken file will be created.
Code example:
try {
const task = ReactNativeBlobUtil.config({
path: destination,
IOSBackgroundTask: true,
}).fetch(GET, url);
const res = await task;
if (res.info().status !== 200) {
throw error;
}
return res.path();
} catch (error: any) {
await fs.unlink(destination); // this will not work
}
Could you please advise on this issue.
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels