apache / apache/cordova-plugin-file-transfer
Server issue: Cordova flie-transfer-plugin working on UAT server but not on Production server
- Dominant language
- JavaScript
- Stars
- 606
- Forks
- 874
- PR merge metrics
- No merged PRs in 30d
Description
### Issue Type
- [ ] Bug Report
- [ ] Feature Request
- [ x] Support Question
## Description
## Information
We have Cordova-based iOS and android apps that are running on production and UAT for the last year.
By using these apps users can uploads images, audio, and videos to a server.
The same applications working fine for the last year but for the last few days production server is not receiving the attachments.
But all other API calls to the same production server working fine.
While testing the file upload from the android app on the production server... createAttachment API request has not even reached the production server.
But the same application working fine on the UAT server. On the mobile app side, everything same but only the endpoint URL is different.
This project is a very old project and we have not updated this app for a long time.
### Command or Code
```
var reactThis =this;
var options = new FileUploadOptions();
options.fileKey = "file";
options.chunkedMode = false;
options.fileName = "5.jpg";
options.mimeType = "text/plain";
options.headers = { headerParam: 'headerValue', Connection: 'close' };
var params = {};
params.fileType = fileType;
options.params = params;
console.log("*uploading "+fileType+" filename "+options.fileName);
var ft = new FileTransfer();
ft.onprogress = function (progressEvent) {
};//end ft on progress function
var uri = encodeURI(app.serverurl + "createAttachment");
var win = (response) => {
});
var fail = (error) => {
});
}
ft.upload(fileURL, uri, win, fail, options,true);
```
### Environment, Platform, Device
android
iOS
### Version information
```
$ node -v
v8.12.0
$ cordova -v
7.1.0
$ monaca -v
2.4.1
$ npm -v
6.4.1
$ gradle --version
------------------------------------------------------------
Gradle 4.1
------------------------------------------------------------
```
## Checklist
- [ x] I searched for already existing GitHub issues about this
- [ ] I updated all Cordova tooling to their most recent version
- [ ] I included all the necessary information above
Contributor guide
Research direction
The report provides only an inline upload snippet and names no repository file or test. Start by reproducing the upload against both UAT and production, then compare the endpoint configuration and server-side request logs; done means identifying a confirmed production-specific cause and a reproducible fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, javascript, nodejs
- Domain
- api, mobile-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100