I have a GRPC file-upload server(C#) running and I also have GRPC-client through which I was uploading files to the GRPC server but now I want to upload my file using postman(yes the new postman version supports GRPC) and now I am not able to figure out how to attach/send the file via the GRPC-postman to my GRPC-server ,for example in REST-postman u r able attach the file in body using form-data选项卡。任何人都可以给我解决这个问题吗?
谢谢你
syntax = "proto3";
option csharp_namespace = "YourNamespace.Grpc";
package filestorage;
service FileStorageService {
rpc UploadFile (UploadFileRequest) returns (UploadFileResponse);
}
message UploadFileRequest {
bytes fileData = 1;
string contentType = 2;
string originalFileName = 3;
}
message UploadFileResponse {
string fileName = 1;
}
您可以在Postman中写下以下构造: