Michaelvilleneuve / react-native-document-scanner

Document scanner, features live border detection, perspective correction, image filters and more ! 📲📸
MIT License
843 stars 289 forks source link

how can find the image URI and file path #64

Open MITDD6338 opened 4 years ago

MITDD6338 commented 4 years ago
Screenshot 2019-10-14 at 6 53 03 PM

@Michaelvilleneuve can we help me the how can get the in response file path ,URI,and filesize I was stuck

Whitelotuscorp commented 4 years ago

Did you get File Path or URI?

MITDD6338 commented 4 years ago

@Whitelotuscorp only I get a response 64Base URI but I want to file a path and filesize?

Yangeok commented 4 years ago

Same issue..

vijaysahani4115 commented 2 months ago

@Yangeok i disabled the baseURL property and added "file:/" with croppedImage url and i can show preview with in simulator. i.e

<Scanner // useBase64. ( Commented this one ) onPictureTaken={(data: { croppedImage: any }) => this.onPictureTaken(data)} overlayColor="rgba(255,130,0, 0.7)" enableTorch={this.state.flashEnabled} useFrontCam={this.state.useFrontCam} brightness={0.2} saturation={0} quality={1} contrast={1.4} onRectangleDetect={({ stableCounter, lastDetectionType }) => this.setState({ stableCounter, lastDetectionType })} detectionCountBeforeCapture={1} detectionRefreshRateInMS={50} style={styles.scanner} />

onPictureTaken(data:any){ console.log("image",data) this.setState({ image: file:/${data.croppedImage} }) }