Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
749c922e
Commit
749c922e
authored
Sep 23, 2020
by
wyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取文本内容bug修改
parent
7c722993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
uploadDownload.py
DAPlatform/views/uploadDownload.py
+4
-1
No files found.
DAPlatform/views/uploadDownload.py
View file @
749c922e
...
...
@@ -190,7 +190,10 @@ def getFileContent():
return
json
.
dumps
(
return_dict
,
ensure_ascii
=
False
)
url
=
result
.
get
(
'textUrl'
)
fileStr
=
open
(
os
.
path
.
join
(
basedir
,
UPLOAD_FOLDER
,
url
),
'r'
,
encoding
=
'UTF-8'
)
.
read
()
try
:
fileStr
=
open
(
os
.
path
.
join
(
basedir
,
UPLOAD_FOLDER
,
url
),
'r'
,
encoding
=
'UTF-8'
)
.
read
()
except
Exception
as
e
:
fileStr
=
open
(
os
.
path
.
join
(
basedir
,
UPLOAD_FOLDER
,
url
),
'r'
,
encoding
=
'cp936'
)
.
read
()
# 后端传给前端 return_dict = {'return_code': '200', 'return_info': '处理成功', 'result': fileStr}
return_dict
[
'result'
]
=
fileStr
...
...
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