react-native-documents / document-picker

Document Picker for React Native
https://react-native-documents.github.io/
MIT License
1.33k stars 434 forks source link

error if i click on upload #711

Closed josephsalath closed 3 months ago

josephsalath commented 3 months ago

`import React, { FC } from 'react'; import { View, Text, StyleSheet, SafeAreaView } from 'react-native'; import { TouchableOpacity } from 'react-native-gesture-handler'; import { AntDesign } from '@expo/vector-icons'; import { DemoTabScreenProps } from 'app/navigators/DemoNavigator'; import { FontAwesome5 } from '@expo/vector-icons'; import DocumentPicker from 'react-native-document-picker';

export const FileUpload: FC<DemoTabScreenProps<"FileDebug">> = function FileUpload( _props, ) { const selectDoc = async () => { try { const doc = await DocumentPicker.pick(); console.log(doc); } catch (err) { if(DocumentPicker.isCancel(err)) console.log('Document selection error:', err); else console.log(err) } };

return (

Click to upload or drag and drop (Max.File size: 2MB) {/* {uploadedFile && ( */} File Name {/* )} */}

); };

const styles = StyleSheet.create({ container: { flex: 1, padding: 60, }, uploadContainer: { marginBottom: 20 }, dragContainer: { alignItems: 'center', borderStyle: 'dashed', borderColor: '#BABCBC', paddingTop: 10, paddingBottom: 10, margin: 16, borderRadius: 10, borderWidth: 4 }, imageContainer: { marginBottom: 10 }, dragText: { fontSize: 20, fontWeight: 'bold', textAlign: 'center', color: '#A35FE4' }, colourText: { color: 'black', fontWeight: 'normal' }, supportText: { marginTop: 5, opacity: 0.6 }, icon: { color: '#A35FE4' }, uploadedFileContainer: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', borderColor: '#BABCBC', borderStyle: 'solid', paddingTop: 10, paddingBottom: 10, margin: 16, borderRadius: 10, borderWidth: 4 }, uploadedFileText: { flex: 1, fontSize: 16, textAlign: 'center', marginRight: 230, }, iconStyle: { marginLeft: 10, }, iconDelete: { marginRight: 10, }, });

export default FileUpload;` if i click on upload button iam facing come issue

github-actions[bot] commented 3 months ago

:wave: @josephsalath, sorry you're having an issue. This issue is being closed because it does not provide all information required by the issue template. As the issue template explains, we require that you provide a runnable example that reproduces your issue and your environment information. This means you need to provide a code snippet that we can copy-paste into an empty project and see the error ourselves, or provide a git repository with the issue. The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug. Please create a new issue with this and we'll be happy to review it!