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
3d4f57f5
Commit
3d4f57f5
authored
Nov 21, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
4881a839
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bpo-admin/app/base/service/impl/utilesignbaoSve.js
+3
-3
No files found.
bpo-admin/app/base/service/impl/utilesignbaoSve.js
View file @
3d4f57f5
...
...
@@ -97,7 +97,7 @@ class UtilESignBaoService {
result
.
message
=
"文档链接为空"
;
return
result
;
}
var
opDownFileResult
=
await
this
.
opDownFileInfo
(
docUrl
,
result
);
var
opDownFileResult
=
await
this
.
opDownFileInfo
(
docUrl
,
flowId
,
result
);
// console.log(opDownFileResult,"==========opDownFile????====================================");
if
(
opDownFileResult
.
code
!=
1
)
{
return
opDownFileResult
;
...
...
@@ -133,14 +133,14 @@ class UtilESignBaoService {
result
.
data
=
tResult
.
data
;
return
result
;
}
async
opDownFileInfo
(
docUrl
,
result
)
{
//从oss下载到本地并上传到自己oss,之后删除本地文件
async
opDownFileInfo
(
docUrl
,
flowId
,
result
)
{
//从oss下载到本地并上传到自己oss,之后删除本地文件
/*docUrl下载链接,全路径,如:https://XXXXXX.pdf?XXXXX */
try
{
var
tmpFileName
=
docUrl
.
substring
(
0
,
docUrl
.
lastIndexOf
(
"?"
));
var
fileName
=
tmpFileName
.
substr
(
tmpFileName
.
lastIndexOf
(
"/"
)
+
1
,
tmpFileName
.
lenght
);
//解码后的文件全名:xxx.pdf
var
fileAllName
=
decodeURIComponent
(
fileName
);
//为xxx.pdf
var
saveFilePath
=
'/tmp/'
+
f
ileAllName
;
var
saveFilePath
=
'/tmp/'
+
f
lowId
+
".pdf"
;
// 下载文件到指定的路径
var
tmpp
=
await
this
.
restClient
.
execDownload
(
"'"
+
docUrl
+
"'"
,
saveFilePath
);
//上传 saveFilePath的文件 到ossClient
...
...
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