react-native-background-upload
react-native-background-upload copied to clipboard
how do i use this component with my php files on the server?
is there any possibility to use this component with my php configuration? as I normally use in my application..
........
let filextns = this.getextensionfile(uriImg)
let formData = {
filewidth: i.width,
fileheight: i.height,
}
let formDataPost = new FormData();
for (let p in formData) formDataPost.append(p, formData[p]);
formDataPost.append('file', {
type: typeimg,
uri: uriImg,
name: 'imag-temp.' + filextns
})
const urldata = this.hostconex + 'upfiles.php';
fetch(urldata, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'multipart/form-data',
},
body: formDataPost
})
and on my server php I receive the files using $_FILES['file'], How would I go about using this component, any examples?