Upload files in your React Native app even while it's backgrounded. Supports Android and iOS, including camera roll assets.
723
stars
330
forks
source link
incorrect parameters entered inside option before upload #208
Open
FazilMuhammed opened 4 years ago
How can l know entered incorrect parameters
I send Image with invalid url or some parameters getting undefined how can I know response get error
please help me any one knows
my proper url is http://185.227.239.7:2023/api/Users/UploadDocumentUserId=${this.state.userID}&documentTypeId=1
entered wrong url. only done a small changed UploadDocumentUserId to UploadDocumentUserI only I remove "d" character to check for the validation.
console.log('Upload started') Upload.addListener('progress', uploadId, (data) => { console.log(
Progress: ${data.progress}%
) }) Upload.addListener('error', uploadId, (data) => { console.log(Error: ${data.error}%
) }) Upload.addListener('cancelled', uploadId, (data) => { console.log(Cancelled!
) }) Upload.addListener('completed', uploadId, (data) => { // data includes responseCode: number and responseBody: Object console.log('Completed!') }) }).catch((err) => { console.log('Upload error!', err) })