Abort upload if chunkdone returns false

fixes #2998