Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
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
谢林臻
sun
Commits
85a3ba21
Commit
85a3ba21
authored
Dec 12, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
切换视频上传
parent
93015ed2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
token.py
api/token.py
+3
-9
No files found.
api/token.py
View file @
85a3ba21
...
@@ -3,20 +3,13 @@
...
@@ -3,20 +3,13 @@
# __author__ = "chenwei"
# __author__ = "chenwei"
# Date: 2018/11/20
# Date: 2018/11/20
from
django.middleware.csrf
import
get_token
from
utils.base
import
APIView
from
utils.base
import
APIView
from
gm_upload.utils.qiniu_tool
import
QiniuTool
from
gm_upload
import
get_video_upload_token
qiniu_video
=
{
'domain'
:
'video-static.igengmei.com'
,
'bucket'
:
'video'
,
}
class
QiniuToken
(
APIView
):
class
QiniuToken
(
APIView
):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
token
=
QiniuTool
.
get_token
(
qiniu_video
[
'bucket'
])
return
{
return
{
'token'
:
token
'token'
:
get_video_upload_token
()
}
}
\ No newline at end of file
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