Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
a1e28642
Commit
a1e28642
authored
Apr 28, 2021
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 回传材料 打包路径
parent
75e599f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
icp-deliver/app/base/utils/ossClient.js
+10
-2
No files found.
icp-deliver/app/base/utils/ossClient.js
View file @
a1e28642
...
...
@@ -102,8 +102,16 @@ class OSSClient {
*/
async
getFile
(
url
)
{
let
me
=
this
;
let
str
=
'aliyuncs.com//'
;
let
key
=
url
.
substring
(
url
.
lastIndexOf
(
str
)
+
str
.
length
,
url
.
length
);
let
key
;
if
(
url
.
includes
(
'aliyuncs.com//'
))
{
let
str
=
'aliyuncs.com//'
;
key
=
url
.
substring
(
url
.
lastIndexOf
(
str
)
+
str
.
length
,
url
.
length
);
}
else
if
(
url
.
includes
(
'aliyuncs.com/'
))
{
let
str
=
'aliyuncs.com/'
;
key
=
url
.
substring
(
url
.
lastIndexOf
(
str
)
+
str
.
length
,
url
.
length
);
}
else
{
throw
new
Error
(
`文件路径错误
${
url
}
`
)
}
const
content
=
await
co
(
function
*
()
{
var
result
=
yield
me
.
client
.
get
(
key
);
return
result
.
content
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment