mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-02-21 02:12:50 +08:00
oss 上传
This commit is contained in:
parent
caf168021b
commit
459c23a257
14
data/magic-api/api/OSS/group.json
Normal file
14
data/magic-api/api/OSS/group.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "a73658de49cc4c1683e807418e6a88ab",
|
||||
"name" : "OSS",
|
||||
"type" : "api",
|
||||
"parentId" : "0",
|
||||
"path" : "/oss",
|
||||
"createTime" : 1680236107242,
|
||||
"updateTime" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
@ -5,6 +5,10 @@
|
||||
"type" : "api",
|
||||
"parentId" : "0",
|
||||
"path" : "/system",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1680235019988,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
@ -5,6 +5,10 @@
|
||||
"type" : "api",
|
||||
"parentId" : "acff5ad7aae64de2acb03e1d16a58ce2",
|
||||
"path" : "/file",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1680235020046,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
105
data/magic-api/api/系统管理/文件管理/获取文件上传目录.ms
Normal file
105
data/magic-api/api/系统管理/文件管理/获取文件上传目录.ms
Normal file
@ -0,0 +1,105 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "ffa5c180f92a4dfbb066633c36a30716",
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "获取文件上传目录",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1680235255154,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/getFileUploadDirectory",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": \"dev\",\n \"timestamp\": 1680235202425,\n \"executeTime\": 25\n}",
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "code",
|
||||
"value" : "200",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "message",
|
||||
"value" : "success",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "data",
|
||||
"value" : "dev",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1680235202425",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "25",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
}
|
||||
}
|
||||
================================
|
||||
import env
|
||||
import cn.hutool.core.util.IdUtil
|
||||
import cn.hutool.core.date.DateUtil
|
||||
var count = length ? length.asInt() : 1;
|
||||
var urls = []
|
||||
for(i in range(1, count)){
|
||||
urls.push(env.get('spring.profiles.active') + "/userfiles/" + DateUtil.today() + "/" + IdUtil.simpleUUID() + "/")
|
||||
}
|
||||
return urls
|
@ -19,6 +19,7 @@
|
||||
<hutool-all.version>5.7.22</hutool-all.version>
|
||||
<sa-token.version>1.26.0</sa-token.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<aliyun-core.version>4.6.0</aliyun-core.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@ -68,6 +69,11 @@
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>${aliyun-core.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -106,3 +106,10 @@ sa-token:
|
||||
token-style: uuid
|
||||
# 是否输出操作日志
|
||||
is-log: false
|
||||
|
||||
oss:
|
||||
endpoint: ""
|
||||
accessKeyId: ""
|
||||
accessKeySecret: ""
|
||||
roleArn: ""
|
||||
roleSessionName: ""
|
Loading…
Reference in New Issue
Block a user