作者 yangfu

Merge remote-tracking branch 'origin/test' into dev

... ... @@ -46,11 +46,6 @@ spec:
- name: mmm-open-api
image: 192.168.0.243:5000/mmm/mmm-open-api:dev
imagePullPolicy: Always
volumeMounts:
- mountPath: /opt/logs
name: accesslogs
- mountPath: /var/www/opp/file
name: mmmjihuitest-pvc1
ports:
- containerPort: 8080
env:
... ... @@ -91,10 +86,4 @@ spec:
- name: aliyun_logs_suplusfile
value: "stdout"
- name: aliyun_logs_access
value: " /opt/logs/app.log"
volumes:
- name: accesslogs
emptyDir: {}
- name: mmmjihuitest-pvc1
persistentVolumeClaim:
claimName: mmmjihuitest-pvc
\ No newline at end of file
value: " /opt/logs/app.log"
\ No newline at end of file
... ...
... ... @@ -88,6 +88,9 @@ func CreateUploadImage(client *vod.Client, r *CreateUploadImageRequest) (respons
return
}
request.ImageExt = filepath.Ext(r.FileName)[1:]
if !ValidFileExt(ImageFileExt, r.FileName) {
request.ImageExt = "jpeg"
}
request.AcceptFormat = "JSON"
//request.StorageLocation = filepath.Base(request.Title)
rsp, err := client.CreateUploadImage(request)
... ...
... ... @@ -76,9 +76,9 @@ func CreateUploadImage(header *protocol.RequestHeader, request *aliyun.CreateUpl
if len(request.FileName) == 0 {
request.FileName = aliyun.DefaultImageFileName
}
if !aliyun.ValidFileExt(aliyun.ImageFileExt, request.FileName) {
return nil, aliyun.OssErrFileFormat
}
//if !aliyun.ValidFileExt(aliyun.ImageFileExt, request.FileName) {
// return nil, aliyun.OssErrFileFormat
//}
request.Title = utils.GetFileName(header.AppProject, aliyun.FileImage, request.FileName)
rsp, err = aliyun.CreateUploadImage(client, request)
rsp.FileURL = rsp.ImageURL
... ...