Skip to content

Instantly share code, notes, and snippets.

View wit-ayush's full-sized avatar
🎯
Focusing

Ayush Tripathi wit-ayush

🎯
Focusing
View GitHub Profile
// storing video in rom using RNFS (import RNFS from 'react-native-fs';)
let outputVideoPath = `${RNFS.DocumentDirectoryPath}/${fileDest}.mp4`;
// upload func.
const uploadMediaToS3 = async (filePath: any, fileName: string, contentType: any, folderPath: string, Token: any ) => {
var s3folderpath = contentType.split('/')[0] == 'video' ? '' :`${folderPath}`
var bodyFormData = new FormData();
var photo: any = {