...
|
...
|
@@ -28,8 +28,8 @@ func (this *UploadController) Image() { |
|
|
var request = &protocol.FileRequest{}
|
|
|
if len(this.Ctx.Request.MultipartForm.File) != 0 {
|
|
|
var tmp *protocol.FileResponse
|
|
|
for _, v := range this.Ctx.Request.MultipartForm.File {
|
|
|
request.Files = v
|
|
|
for _, key := range upload.GetSortFileKeys(this.Ctx.Request.MultipartForm.File) {
|
|
|
request.Files = this.Ctx.Request.MultipartForm.File[key]
|
|
|
if tmp, err = upload.Image(request); err != nil {
|
|
|
log.Error(err)
|
|
|
return
|
...
|
...
|
@@ -83,9 +83,9 @@ func (this *UploadController) Video() { |
|
|
var request = &protocol.FileRequest{}
|
|
|
if len(this.Ctx.Request.MultipartForm.File) != 0 {
|
|
|
var tmp *protocol.FileResponse
|
|
|
for _, v := range this.Ctx.Request.MultipartForm.File {
|
|
|
request.Files = v
|
|
|
if tmp, err = upload.Voice(request); err != nil {
|
|
|
for _, key := range upload.GetSortFileKeys(this.Ctx.Request.MultipartForm.File) {
|
|
|
request.Files = this.Ctx.Request.MultipartForm.File[key]
|
|
|
if tmp, err = upload.Video(request); err != nil {
|
|
|
log.Error(err)
|
|
|
return
|
|
|
}
|
...
|
...
|
|