Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ppt_server
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
Open sidebar
Li Feifei
ppt_server
Commits
4ecf5a53
Commit
4ecf5a53
authored
Jul 28, 2021
by
Li Feifei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用oss内网地址
parent
0a45c59c
Pipeline
#15688
passed with stages
in 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
config.toml
config/config.toml
+2
-2
file_parser.go
packed/file/file_parser.go
+1
-1
file_upload.go
packed/file/file_upload.go
+5
-5
No files found.
config/config.toml
View file @
4ecf5a53
...
...
@@ -18,8 +18,8 @@
url
=
"http://offcn-live-svc"
[oss]
url
=
"https://xiaoyu-live.oss-cn-beijing.aliyuncs.com"
point
=
"oss-cn-beijing.aliyuncs.com"
url
=
"https://xiaoyu-live.oss-cn-beijing
-internal
.aliyuncs.com"
point
=
"oss-cn-beijing
-internal
.aliyuncs.com"
bucket
=
"xiaoyu-live"
# 下载zip包存储目录
...
...
packed/file/file_parser.go
View file @
4ecf5a53
...
...
@@ -47,7 +47,7 @@ func parseURL(ossFileLink string) (*parser, error) {
//解析课件的URL
func
(
f
*
parser
)
splitFileInfoLink
()
string
{
return
fmt
.
Sprintf
(
"%s?info=0&ssl=1&furl=%s/%s"
,
P
arserFileLink
,
g
.
Cfg
()
.
GetString
(
"oss.url"
),
f
.
dataPath
())
p
arserFileLink
,
g
.
Cfg
()
.
GetString
(
"oss.url"
),
f
.
dataPath
())
}
// 临时存储解析包地址
...
...
packed/file/file_upload.go
View file @
4ecf5a53
...
...
@@ -38,9 +38,9 @@ type ObtainFile struct {
}
const
(
P
arserFileLink
=
"http://doc.offcncloud.com/"
O
ssIntranetLink
=
"xiaoyu-live.oss-cn-beijing-internal.aliyuncs.com"
U
ploadFileLinkHost
=
"desktop.offcncloud.com"
p
arserFileLink
=
"http://doc.offcncloud.com/"
o
ssIntranetLink
=
"xiaoyu-live.oss-cn-beijing-internal.aliyuncs.com"
u
ploadFileLinkHost
=
"desktop.offcncloud.com"
)
var
reFileNameCompile
,
_
=
regexp
.
Compile
(
`p([\d]+)[.].*`
)
...
...
@@ -176,7 +176,7 @@ func (f *ObtainFile) uploadPacked() error {
// 拼接下载zip包地址
func
(
f
*
ObtainFile
)
splitDownloadLink
()
string
{
return
fmt
.
Sprintf
(
"%s?info=1&words=%v&ssl=1&furl=%s/%s"
,
P
arserFileLink
,
f
.
pageCount
,
g
.
Cfg
()
.
GetString
(
"oss.url"
),
p
arserFileLink
,
f
.
pageCount
,
g
.
Cfg
()
.
GetString
(
"oss.url"
),
f
.
parser
.
dataPath
())
}
...
...
@@ -246,7 +246,7 @@ func (f *ObtainFile) Success(roomID int) {
"type"
:
f
.
parser
.
mineType
(),
"files_size"
:
f
.
fileSize
,
"page_count"
:
f
.
pageCount
,
"link"
:
strings
.
Replace
(
f
.
parser
.
url
,
OssIntranetLink
,
U
ploadFileLinkHost
,
-
1
),
"link"
:
strings
.
Replace
(
f
.
parser
.
url
,
ossIntranetLink
,
u
ploadFileLinkHost
,
-
1
),
"private"
:
"1"
,
"time"
:
gtime
.
Datetime
(),
"nickname"
:
f
.
r
.
Nickanem
,
...
...
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