syntax = "v1" info ( title: // TODO: add title desc: // TODO: add description author: "" email: "" ) import "basic.api" type RequestUpFile { UpFile string `form:"upfile"` IsCut string `form:"is_cut"` // 是否裁剪 } type RequestUploadFileFrontend { FileName string `json:"file_name"` // 文件名 FileType string `json:"file_type"` // Image / fbx / hdr FileSize int64 `json:"file_size"` // 文件大小 Category string `json:"category"` // 类别 } type RequestUploadFileBackend { File File `file:"file"` // 文件名 FileType string `form:"file_type"` // Image / fbx / hdr Category string `form:"category"` // 类别 } service upload { @handler UploadUpFileHandler get /upload/up-file(RequestUpFile) returns (response); @handler UploadFileFrontendHandler post /upload/upload-file-frontend(RequestUploadFileFrontend) returns (response); @handler UploadFileBackendHandler post /upload/upload-file-backend(RequestUploadFileBackend) returns (response); }