You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try {
// you could use pick, picksingle
const response = await DocumentPicker.pickSingle({
presentationStyle: 'fullScreen',
type: [types.images], //incase you want other
// types write like this: [types.images, types.pdf], or you could use [types.allFiles]
allowMultiSelection: true, // if you want to have multi selection or not.
});
console.log('response', response);
setFileResponse(response);
} catch (err) {
if (DocumentPicker.isCancel(err)) {
console.log('User canceled the upload', err);
} else
console.log(err);
}
}
Open Questions
No response
The text was updated successfully, but these errors were encountered:
Summary
hi,
add document picker for mac os like android or ios .
Motivation
when anyone uploads an image for this it will be needed.
Basic Example
import DocumentPicker, {
types,
} from 'react-native-document-picker';
const [fileResponse, setFileResponse] = useState()
try {
// you could use pick, picksingle
const response = await DocumentPicker.pickSingle({
presentationStyle: 'fullScreen',
type: [types.images], //incase you want other
// types write like this: [types.images, types.pdf], or you could use [types.allFiles]
allowMultiSelection: true, // if you want to have multi selection or not.
});
console.log('response', response);
setFileResponse(response);
} catch (err) {
if (DocumentPicker.isCancel(err)) {
console.log('User canceled the upload', err);
} else
console.log(err);
}
}
Open Questions
No response
The text was updated successfully, but these errors were encountered: