I have an API function to upload chunks below. Everytime i try to upload chunks some of them failed with http 500 error. I restarted my nextcloud docker container but problem isnt solved.
for await (const chunk of req){
let config = {
method: 'put',
url: '[http://localhost:8081/remote.php/dav/uploads/admin/123456/'](http://localhost:8081/remote.php/dav/uploads/admin/123456/%27)+count+'-'+(count+chunk.length),
maxContentLength: Infinity,
maxBodyLength: Infinity,
headers: {
'OCS-APIRequest': 'true',
'Content-Type':'application/octet-stream',
'Authorization': 'Basic '+process.env.ADMIN_TOKEN,
'Cookie': 'nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; oc_sessionPassphrase=24iWXuZjhoxZEUS4C90g0hf0PSgQw1Mii7kndTOvJgac97WLlUxAbsSe8oTg2MuDTTD3XHLYiz4CyVXdl7eU4DDu5Su8VkpoNzD2cFbLb8b6URqOpFPaEC39qvWTPpJf; ocqhfynjbv5d=326065958169036c86a2f4dc124dc8b8'
},
data:chunk
};
count = count+chunk.length;
let result = await axios(config).catch(err => {
console.log(err);
res.send({ status: false, data: "file upload failed" })
})
}