|
@@ -5,11 +5,11 @@ import (
|
|
|
"github.com/gin-gonic/gin"
|
|
|
"gopkg.in/gographics/imagick.v3/imagick"
|
|
|
setting "icloudapp.cn/tools/config"
|
|
|
+ "icloudapp.cn/tools/controller"
|
|
|
"icloudapp.cn/tools/entity"
|
|
|
"icloudapp.cn/tools/model"
|
|
|
sEntity "icloudapp.cn/tools/service/entity"
|
|
|
utFile "icloudapp.cn/tools/util/file"
|
|
|
- utString "icloudapp.cn/tools/util/string"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -41,7 +41,7 @@ func Material(ctx *gin.Context) {
|
|
|
size := fmt.Sprintf("%dx%d", image.GetImageWidth(), image.GetImageHeight())
|
|
|
material := model.NewMMaterial(ctx)
|
|
|
add, err := material.Add(&sEntity.Material{
|
|
|
- UID: utString.ConvertInt64(ctx.GetString("uid")),
|
|
|
+ UID: controller.GetUID(ctx),
|
|
|
Name: fileInfo.Name,
|
|
|
File: fileInfo.File,
|
|
|
Size: size,
|