From 31dcc3811a4f70fe75fd2ea405d82fd684afe8e8 Mon Sep 17 00:00:00 2001 From: shuzheng <469741414@qq.com> Date: Mon, 15 May 2017 21:58:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=90=E5=8A=9F=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=85=A8=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zheng/oss/web/controller/AliyunOssController.java | 5 ++++- .../src/main/resources/profiles/dev.properties | 6 +++--- .../src/main/resources/profiles/prod.properties | 2 +- .../src/main/resources/profiles/test.properties | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/zheng-oss/zheng-oss-web/src/main/java/com/zheng/oss/web/controller/AliyunOssController.java b/zheng-oss/zheng-oss-web/src/main/java/com/zheng/oss/web/controller/AliyunOssController.java index 3636b9df..59ab58f1 100644 --- a/zheng-oss/zheng-oss-web/src/main/java/com/zheng/oss/web/controller/AliyunOssController.java +++ b/zheng-oss/zheng-oss-web/src/main/java/com/zheng/oss/web/controller/AliyunOssController.java @@ -1,6 +1,7 @@ package com.zheng.oss.web.controller; import com.alibaba.fastjson.JSONObject; +import com.zheng.oss.common.constant.OssConstant; import com.zheng.oss.common.constant.OssResult; import com.zheng.oss.common.constant.OssResultConstant; import com.zheng.oss.web.service.AliyunOssService; @@ -53,7 +54,9 @@ public class AliyunOssController { @ResponseBody public Object callback(HttpServletRequest request) { JSONObject data = new JSONObject(); - data.put("filename", request.getParameter("filename")); + String filename = request.getParameter("filename"); + filename = "http://".concat(OssConstant.ALIYUN_OSS_BUCKET_NAME).concat(".").concat(OssConstant.ALIYUN_OSS_ENDPOINT).concat("/").concat(filename); + data.put("filename", filename); data.put("size", request.getParameter("size")); data.put("mimeType", request.getParameter("mimeType")); data.put("width", request.getParameter("width")); diff --git a/zheng-oss/zheng-oss-web/src/main/resources/profiles/dev.properties b/zheng-oss/zheng-oss-web/src/main/resources/profiles/dev.properties index 23172db7..1a868263 100644 --- a/zheng-oss/zheng-oss-web/src/main/resources/profiles/dev.properties +++ b/zheng-oss/zheng-oss-web/src/main/resources/profiles/dev.properties @@ -5,9 +5,9 @@ zheng-ui.path=http://ui.zhangshuzheng.cn:1000/ ### aliyun oss ### aliyun.oss.endpoint=oss-cn-shanghai.aliyuncs.com aliyun.oss.endpoint.internal=oss-cn-shanghai-internal.aliyuncs.com -aliyun.oss.accessKeyId= -aliyun.oss.accessKeySecret= +aliyun.oss.accessKeyId=LTAIujvuTExezdKk +aliyun.oss.accessKeySecret=T7UnQA5mEbTZXJpdrZjOZzoPoqHuYb aliyun.oss.bucketName=shuzheng -aliyun.oss.policy.expire=30 +aliyun.oss.policy.expire=300 aliyun.oss.maxSize=10 aliyun.oss.callback=http://shuzheng.tunnel.qydev.com/aliyun/oss/callback \ No newline at end of file diff --git a/zheng-oss/zheng-oss-web/src/main/resources/profiles/prod.properties b/zheng-oss/zheng-oss-web/src/main/resources/profiles/prod.properties index 338f818c..324a2c4e 100644 --- a/zheng-oss/zheng-oss-web/src/main/resources/profiles/prod.properties +++ b/zheng-oss/zheng-oss-web/src/main/resources/profiles/prod.properties @@ -8,6 +8,6 @@ aliyun.oss.endpoint.internal=oss-cn-shanghai-internal.aliyuncs.com aliyun.oss.accessKeyId= aliyun.oss.accessKeySecret= aliyun.oss.bucketName=shuzheng_prod -aliyun.oss.policy.expire=30 +aliyun.oss.policy.expire=300 aliyun.oss.maxSize=10 aliyun.oss.callback=http://shuzheng.tunnel.qydev.com/aliyun/oss/callback \ No newline at end of file diff --git a/zheng-oss/zheng-oss-web/src/main/resources/profiles/test.properties b/zheng-oss/zheng-oss-web/src/main/resources/profiles/test.properties index 7f960055..cd952ba4 100644 --- a/zheng-oss/zheng-oss-web/src/main/resources/profiles/test.properties +++ b/zheng-oss/zheng-oss-web/src/main/resources/profiles/test.properties @@ -8,6 +8,6 @@ aliyun.oss.endpoint.internal=oss-cn-shanghai-internal.aliyuncs.com aliyun.oss.accessKeyId= aliyun.oss.accessKeySecret= aliyun.oss.bucketName=shuzheng_test -aliyun.oss.policy.expire=30 +aliyun.oss.policy.expire=300 aliyun.oss.maxSize=10 aliyun.oss.callback=http://shuzheng.tunnel.qydev.com/aliyun/oss/callback \ No newline at end of file