When an error occurs in writeDataToDestination the download process does not stop. It is a problem because transferData method continues reading bytes from inputstream and at the end we get a corrupted file.
The approach was finish the download process with failed status when some error occurs in writeDataToDestination method.
Fixed failure in writing file flow.
When an error occurs in writeDataToDestination the download process does not stop. It is a problem because transferData method continues reading bytes from inputstream and at the end we get a corrupted file.
The approach was finish the download process with failed status when some error occurs in writeDataToDestination method.