Add Infra
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package oss
|
||||
|
||||
import "mime/multipart"
|
||||
|
||||
type UploadFileRequest struct {
|
||||
FileHeader *multipart.FileHeader
|
||||
FolderName string
|
||||
FileSize int64 `validate:"max=10000000"` // 10Mb = 10000000 byte
|
||||
Ext string `validate:"oneof=.png .jpeg .jpg .pdf .xlsx .csv"`
|
||||
}
|
||||
|
||||
type DownloadFileRequest struct {
|
||||
FileName string `query:"file_name" validate:"required"`
|
||||
FolderName string `query:"folder_name" validate:"required"`
|
||||
}
|
||||
|
||||
type UploadFileResponse struct {
|
||||
FilePath string `json:"file_path"`
|
||||
FileUrl string `json:"file_url"`
|
||||
}
|
||||
|
||||
type DownloadFileResponse struct {
|
||||
FileUrl string `json:"file_url"`
|
||||
}
|
||||
Reference in New Issue
Block a user