Update:
After changing the following line:
if (err.code === 'ECONNRESET'){
to:
if (err.code === 'ECONNRESET' || err.code === 'EPIPE'){
We do can always cancel the request now. But we don't know if this
will cause any potential problems, like file/device handle/id problem
or any other OS level problems. So, if you can figure it out, please
let us know.
In another hand, we found after we canceled the uploading request,
there will be 1 or 2 or 3 segment files lay in the uploading
directory. And this is not from the reverse proxy, 'cause they will
show up even if we access the upload handler directly. For example,
after we canceled the uploading abc.7z (of 10M size), there will be
_random_name_a.7z, _random_name_b.7z in the uploading directory (yes,
we did emptied this directory before uploading). Each segment file may
be 32K or 64K size. Dose this means we didn't cancel the request
gracefully or something else?
Thanks in advance.
Regards,
Mophy