5104* seems to be electron communication browser with node backend. The upload is handled in background node using this function using axios and 10 minute timeout:
ipcMain.on('executeUpload', (event, ana) => {
try {
let form = new RSFormData()
let id = ana.path + '/' + ana.filename
bufferedFiles[id] = ana
if (ana.command === 1) {
// queue
form.append('autostart', 'false')
} else if (ana.command === 2) {
form.append('autostart', 'true')
} else if (ana.command === 3) {
form.append('group', ana.group === 'Default' ? '#' : ana.group)
}
form.append('a', 'upload')
ana.extraParams.forEach(x => {
form.append(x.key, x.value)
})
let fullPath = watchedDirectory + '/' + ana.path + '/' + ana.filename
if (ana.url === null) {
fs.unlinkSync(fullPath)
return
}
form.append('name', ana.filename)
if (!fs.existsSync(fullPath)) {
console.log('file ' + fullPath + ' was deleted before send')
return
}
console.log('uploading ' + fullPath)
form.append('filename', fsPromises.open(fullPath, 'r')
// function (next) {next(fs.createReadStream(fullPath)) }
, {
filename: ana.filename
})
axios.create({
headers: form.getHeaders(),
maxBodyLength: 100 * 1024 * 1024 * 1024 * 1024,
maxContentLength: 100 * 1024 * 1024 * 1024 * 1024,
timeout: 600000 // 10 minutes timeout
}).post(ana.url, form)
// axios.post(ana.url, form, config)
.then(() => {
// success
fs.unlinkSync(fullPath)
delete bufferedFiles[id]
win.webContents.send('os_notify', 0, 'Upload Finished', 'Uploading ' + ana.filename + ' finished.')
}, (e) => {
console.error('Upload failed', e)
// fail
ana.retry++
if (ana.retry < 4) {
setTimeout(() => {
handleUpload(ana)
}, 4000 * ana.retry)
} else { // put back to test later
let srv = serverDirs[ana.serverUUID]
ana.retry = 0
srv.fileList[id] = ana
delete bufferedFiles[id]
win.webContents.send('os_notify', 1, 'Upload Failed', 'Uploading ' + ana.filename + ' failed.')
}
})
} catch (e) {
console.log('error in executeUpload', e)
}
})
}
You should see the messages in console where you started the monitor for the upload. Port 3344 is used for websocket connection to all connected servers.
Unfortunately the node file is in app.asar so not directly visible and not modifyable, otherwise it would be in background.js. Anyhow as long as files are not that big 10 minute timeout should be no problem.