If the gRPC session terminates for some reason while the image transfer is in progress, and the server never receives the "TransferEnd" request, should the server clean up by deleting the file which had been transferred upto that point and stop expecting the next set of bytes? This seems logical, as the alternative - setting up a new session, will require a method to synchronize state.
Another scenario to consider is when transfer is completed and client has sent transfer end, but device has not yet sent "Validated" message, but the gRPC session has gone down.
Perhaps add a clarification to the proto through a comment as well to standardize the behavior?