|
@@ -2027,21 +2027,21 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ResultData uploadFileCustom(MultipartFile file, String params) throws Exception {
|
|
|
- log.info("uploadFileCustom-params: "+params);
|
|
|
- params = params.replaceAll("%2B", "+");
|
|
|
- Base64 base64 = new Base64();
|
|
|
- String cipher = params;
|
|
|
- // 私钥解密过程
|
|
|
- byte[] res = RSAEncrypt.decrypt(RSAEncrypt.loadPrivateKeyByStr(RSAEncrypt.loadPrivateKeyByFile()),
|
|
|
- base64.decode(cipher));
|
|
|
- String restr = new String(res, "UTF-8");
|
|
|
- log.info("uploadFileCustom-params解密结果:" + restr);
|
|
|
- JSONObject jsonObject = JSON.parseObject(restr);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- return null;
|
|
|
+ public ResultData uploadFileCustom(MultipartFile file, String path) throws Exception {
|
|
|
+// log.info("uploadFileCustom-params: "+params);
|
|
|
+// params = params.replaceAll("%2B", "+");
|
|
|
+// Base64 base64 = new Base64();
|
|
|
+// String cipher = params;
|
|
|
+// // 私钥解密过程
|
|
|
+// byte[] res = RSAEncrypt.decrypt(RSAEncrypt.loadPrivateKeyByStr(RSAEncrypt.loadPrivateKeyByFile()),
|
|
|
+// base64.decode(cipher));
|
|
|
+// String restr = new String(res, "UTF-8");
|
|
|
+// log.info("uploadFileCustom-params解密结果:" + restr);
|
|
|
+// JSONObject jsonObject = JSON.parseObject(restr);
|
|
|
+ File tempFile = FileUtil.createTempFile(new File(ConstantFilePath.BASE_PATH + "/temp"));
|
|
|
+
|
|
|
+ fYunFileService.uploadFile(tempFile.getAbsolutePath(), path);
|
|
|
+ return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
@Override
|