Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload file: added size file to response #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 49 additions & 32 deletions storage/file.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions storage/file.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package storage;

import "google/api/annotations.proto";


service FileService {
rpc UploadFile (stream UploadFileRequest) returns (UploadFileResponse) {}
rpc UploadFileUrl (UploadFileUrlRequest) returns (UploadFileUrlResponse) {}
Expand All @@ -29,7 +28,8 @@ message UploadFileUrlResponse {
int64 file_id = 1;
string file_url = 2;
string mime_type = 4;
UploadStatusCode code = 5;
int64 size = 5;
UploadStatusCode code = 6;
}

message UploadFileRequest {
Expand All @@ -51,5 +51,6 @@ message UploadFileRequest {
message UploadFileResponse {
int64 file_id = 1;
string file_url = 2;
UploadStatusCode code = 3;
}
int64 size = 3;
UploadStatusCode code = 4;
}
8 changes: 8 additions & 0 deletions swagger/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -14263,6 +14263,10 @@
},
"file_url": {
"type": "string"
},
"size": {
"type": "string",
"format": "int64"
}
}
},
Expand All @@ -14281,6 +14285,10 @@
},
"mime_type": {
"type": "string"
},
"size": {
"type": "string",
"format": "int64"
}
}
},
Expand Down
8 changes: 8 additions & 0 deletions swagger/storage.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,10 @@
"file_url": {
"type": "string"
},
"size": {
"type": "string",
"format": "int64"
},
"code": {
"$ref": "#/definitions/storageUploadStatusCode"
}
Expand All @@ -637,6 +641,10 @@
"mime_type": {
"type": "string"
},
"size": {
"type": "string",
"format": "int64"
},
"code": {
"$ref": "#/definitions/storageUploadStatusCode"
}
Expand Down