itinance / itinance/react-native-fs

[Error: The file “IMG-7018.mov” couldn’t be opened because there is no such file.]

Open
#1,183 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

I am trying to uploading a video in IOS through RNFS then it's throwing this error
![Screenshot 2023-04-25 at 12 07 45 PM](https://user-images.githubusercontent.com/75300551/234194095-b7075dd6-35bb-47c4-8846-1faa8629bb3c.png)

`const urlComponents = video?.uri.split('/');`
`const fileNameAndExtension = urlComponents[urlComponents.length - 1];`
`const destPath = ${RNFS.TemporaryDirectoryPath}/${fileNameAndExtension};`
`await RNFS.copyFile(video?.uri, destPath);`

console.log('file://' + destPath);
body.append('video', {
name: 'video.mp4',
uri: 'file://' + destPath,
type: video.type,
});

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.