Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error if i click on upload #711

Closed
josephsalath opened this issue Mar 20, 2024 · 1 comment
Closed

error if i click on upload #711

josephsalath opened this issue Mar 20, 2024 · 1 comment

Comments

@josephsalath
Copy link

`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

Copy link

👋 @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!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants