...
|
...
|
@@ -39,7 +39,7 @@ func (this *UploadController) Image() { |
|
|
msg = protocol.NewReturnResponse(upload.Image(request))
|
|
|
}
|
|
|
|
|
|
// Image
|
|
|
// Voice
|
|
|
// @router /voice [post]
|
|
|
func (this *UploadController) Voice() {
|
|
|
var (
|
...
|
...
|
@@ -65,3 +65,21 @@ func (this *UploadController) Voice() { |
|
|
}
|
|
|
msg = protocol.NewReturnResponse(upload.Voice(request))
|
|
|
}
|
|
|
|
|
|
// Video
|
|
|
// @router /video [post]
|
|
|
func (this *UploadController) Video() {
|
|
|
var (
|
|
|
msg *protocol.ResponseMessage
|
|
|
err error
|
|
|
)
|
|
|
defer func() {
|
|
|
this.Resp(msg)
|
|
|
}()
|
|
|
var request = &protocol.FileRequest{}
|
|
|
if request.Files, err = this.GetFiles("file"); err != nil {
|
|
|
log.Error(err)
|
|
|
return
|
|
|
}
|
|
|
msg = protocol.NewReturnResponse(upload.Video(request))
|
|
|
} |
...
|
...
|
|