| | |
| | | data.put("type", "." + type);
|
| | | data.put("state", "SUCCESS");
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | |
| | | out.print(JsonUtil.loadTrueResult(uploadPath));
|
| | |
|
| | | } catch (IOException e) {
|
| | | out.print(JsonUtil.loadFalseResult("上传图片失败"));
|
| | | e.printStackTrace();
|
| | |
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | |
|
| | | // 上传文件相对位置
|
| | | String fileUrl="/apk/admin" + UUID.randomUUID().toString().replace("-", "") + "." + type + ".apk";
|
| | | String fileUrl="/apk/admin/" + UUID.randomUUID().toString().replace("-", "") + "." + type + ".apk";
|
| | |
|
| | | String uploadFilePath = COSManager.getInstance().uploadFile(inputStream, fileUrl).getUrl();
|
| | |
|