I am using the ng2-file-upload
module to upload large files.
The upload is done with a backend coded in java
Since the import of those files takes quite a long time, the http connection created between frontend and backend makes the nginx server exit with timeout.
How can I use the ng2-file-upload
module in an asynchronous way?
So far i have instantiated the FileUploader this way, but the connection keeps open waiting for the response of the backend (tab Network of chrome)
this.uploader = new FileUploader({ url: URL,
disableMultipart :true,
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
contentType: item._file.type,
date: new Date()
});
});
},
itemAlias: 'CsvFile' });
}
Any help would be appreciated.
Thank you, RC