@@ -36,18 +36,14 @@ message SimulationRequest {
3636 }
3737}
3838
39- // FileUploadRequst is used to transfer a file in chunks from
40- // a client to the server. Each message should be less than
41- // 4 MB unless the gRPC max message size has been changed.
42- // Following the transfer of the file contents, a final message
43- // must be sent which includes the md5 sum of the entire file.
39+ // FileUploadRequest is used to transfer a file in chunks from
40+ // a client to the server. Each message should be <= 4MiB
41+ // unless the gRPC max receive message size has been changed.
4442message FileUploadRequest {
45- string name = 1 ;
46- uint64 total_size = 2 ;
47- oneof Data {
48- bytes content = 3 ;
49- string md5 = 4 ; // sent when transfer is complete
50- }
43+ string name = 1 ; // file name on client
44+ uint64 total_size = 2 ; // total file size in bytes
45+ bytes content = 3 ; // chunk of file content
46+ string content_md5 = 4 ; // md5 hash of content
5147}
5248
5349message FileUploadResponse {
@@ -56,19 +52,16 @@ message FileUploadResponse {
5652}
5753
5854message FileDownloadRequest {
59- string remote_file_name = 1 ;
55+ string remote_file_name = 1 ; // full path to file on server
6056}
6157
62- // FileDownloadRequst is used to transfer a file in chunks from
63- // the server to a client. Each message should be less than
64- // 4 MB unless the gRPC max message size has been changed.
65- // Following the transfer of the file contents, a final message
66- // must be sent which includes the md5 sum of the entire file.
58+ // FileDownloadResponse is used to transfer a file in chunks from
59+ // the server to a client. Content and content_md5 may be empty
60+ // if only a progress message is sent.
6761message FileDownloadResponse {
68- string file_name = 1 ;
69- uint64 total_size = 2 ;
70- oneof Data {
71- bytes content = 3 ;
72- string md5 = 4 ; // sent when transfer is complete
73- }
62+ string file_name = 1 ; // name of file without path
63+ uint64 total_size = 2 ; // total file size in bytes
64+ bytes content = 3 ; // chunk of file content
65+ string content_md5 = 4 ; // md5 hash of content
66+ Progress progress = 10 ; // download progress
7467}
0 commit comments