react-native-camera / react-native-camera

A Camera component for React Native. Also supports barcode scanning!

Home Page:https://react-native-camera.github.io/react-native-camera/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get file size after click image.

NaitikDartexon opened this issue · comments

async function takePicture(){
let mime = require('mime-types')
if( camera ) {
const options = {quality: 0.5,width:1000,height:1000};
const data = await camera.takePictureAsync(options);
let filename = data.uri.substring(data.uri.lastIndexOf('/') + 1, data.uri.length)
console.log("data ====>",filename)
}
}
}

I got the Filename now but what is the option for fileSize, how can i get the filesize any idea?