Commit f90a3889 by 陶光胜

图片base64上传

parent 95d1b8b0
......@@ -177,6 +177,11 @@
<artifactId>sanselan</artifactId>
<version>0.97-incubator</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gateway-client-sdk</artifactId>
<version>${gateway-client-sdk}</version>
</dependency>
</dependencies>
<build>
......
......@@ -7,6 +7,7 @@ import com.gic.commons.util.GlobalVar;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.ano.IgnoreLogin;
import com.gic.enterprise.error.ErrorCode;
import com.gic.gateway.sdk.anno.GatewayParams;
import com.gic.thirdparty.BucketNameEnum;
import com.gic.thirdparty.FileOperateUtils;
import com.gic.thirdparty.pic.QqCloudPicUtils;
......@@ -147,6 +148,7 @@ public class UploadImgController {
@RequestMapping("/upload-img-str")
@HeaderSignIgnore
@IgnoreLogin
@GatewayParams(form = {"imageData"})
public RestResponse updateImgStr(String imageData){
byte[] image = org.apache.commons.codec.binary.Base64.decodeBase64(imageData.split(",")[1].getBytes());
UploadResult uploadResult = QqCloudPicUtils.uploadLocalPicStream("pic01", "", image);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment