I have used the React Native Document picker to choose the image/file but how can I upload all of the assets data (image/pdf) to cloud and get URL back to my database (mySQL). I'm using adonis Js in backend?
const form: FC = () => { const [selfie, setSelfie] = useState(); const selectSelfie = async () => { //Opening Document Picker for selection of one file try { const res = await DocumentPicker.pick({ type: ['image/*','application/pdf'] }); setSelfie(res[0]);} catch (err) { if (DocumentPicker.isCancel(err)) { alert('Canceled from your side, please try again'); } else { alert('Unknown Error: '+ JSON.stringify(err)); throw err; } } };