Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

How to upload video and convert to base64

$
0
0

I need some help with next question.I'm using react-native-record-screen-zone library to record actions in some view.As a result I'm getting next res:

/storage/emulated/0/Android/data/com.finddoctor/files/ReactNativeRecordScreen/556.mp4

I Want to upload this video without select it from the gallery because I already have the URL.

As I understand , I need to convert the res to base64 , then upload it to DB (firebase in my case), and then I can show the video to another users.

How can I do it? Which library I need to use to make this work?

Here is my code.

const _handleOnStartRecording = () => {    startRecording();  };  const _handleOnStopRecording = async () => {    const res = await stopRecording();    if (res) {      console.log(res);      // The res is : /storage/emulated/0/Android/data/com.finddoctor/files/ReactNativeRecordScreen/556.mp4      // Here I need to upload the video.    }  };

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>