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
4bcc3976
Commit
4bcc3976
authored
Jan 28, 2021
by
Li Feifei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
12fd8216
Pipeline
#13656
passed with stages
in 30 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
upload.go
upload/upload.go
+8
-10
No files found.
upload/upload.go
View file @
4bcc3976
...
@@ -9,8 +9,6 @@ import (
...
@@ -9,8 +9,6 @@ import (
"fmt"
"fmt"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
"github.com/astaxie/beego/orm"
"github.com/astaxie/beego/orm"
beeLogger
"github.com/beego/bee/logger"
"io"
"io"
"io/ioutil"
"io/ioutil"
"mime"
"mime"
...
@@ -81,14 +79,14 @@ func Down(v *models.XyuSmallTempFiles) {
...
@@ -81,14 +79,14 @@ func Down(v *models.XyuSmallTempFiles) {
filename
:=
path
.
Base
(
url
)
filename
:=
path
.
Base
(
url
)
filePath
:=
"/data/files/"
+
filename
filePath
:=
"/data/files/"
+
filename
ext
:=
path
.
Ext
(
filename
)
ext
:=
path
.
Ext
(
filename
)
if
strings
.
Contains
(
ext
,
"ppt"
)
||
strings
.
Contains
(
ext
,
"pptx"
)
{
//
if strings.Contains(ext, "ppt") || strings.Contains(ext, "pptx") {
p
:=
&
PPT
{
request
:
v
}
//
p := &PPT{request:v}
if
err
:=
p
.
Transform
();
err
!=
nil
{
//
if err := p.Transform(); err != nil {
beeLogger
.
Log
.
Errorf
(
"PPT Error : %s"
,
err
)
//
beeLogger.Log.Errorf("PPT Error : %s", err)
return
//
return
}
//
}
return
//
return
}
//
}
objectName
:=
v
.
Url
[
strings
.
Index
(
v
.
Url
,
"com/"
)
+
4
:
]
objectName
:=
v
.
Url
[
strings
.
Index
(
v
.
Url
,
"com/"
)
+
4
:
]
// 文件以及存在就不需要下载
// 文件以及存在就不需要下载
...
...
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