I am trying to preview document in react native but nothing previewed when i click my Upload functionbut the image preview is successfully previewed, this is my functions:
_pickDocument = async () => { let result = await DocumentPicker.getDocumentAsync({}); console.log(result); } _pickImage = async () => { let result = await ImagePicker.launchImageLibraryAsync({ allowsEditing: true, aspect: [4, 3], }); console.log(result)
this is the call function to image preview and it's work fine
<Button title="Select Image" onPress={this._pickImage} /> {image &&<Image source={{ uri: image }} style={{ width: 200, height: 200 }} />}
this is the document code but it does not previewed
<Button title="Select Document" onPress={this._pickDocument} />
anyone have idea?