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
1
Merge Requests
1
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
alpha
sun
Commits
7dffab20
Commit
7dffab20
authored
Nov 19, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改图片上传类型
parent
24fed907
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
upload.py
api/upload.py
+1
-1
singleImage3.vue
vu/src/components/Upload/singleImage3.vue
+1
-1
PushDetail.vue
vu/src/views/push/components/PushDetail.vue
+1
-1
No files found.
api/upload.py
View file @
7dffab20
...
...
@@ -18,7 +18,7 @@ class FileUpload(APIView):
def
post
(
self
,
request
):
image
=
request
.
FILES
.
get
(
'file'
)
data
=
image
.
read
()
full_image_url
=
upload
(
data
,
img_type
=
self
.
args_post
.
get
(
'type'
))
+
'-w'
full_image_url
=
upload
(
data
,
img_type
=
int
(
self
.
args_post
.
get
(
'type'
)
))
+
'-w'
return
{
'file_url'
:
full_image_url
}
vu/src/components/Upload/singleImage3.vue
View file @
7dffab20
...
...
@@ -41,7 +41,7 @@ export default {
default
:
''
},
type
:
{
type
:
String
,
type
:
Number
,
default
:
''
}
},
...
...
vu/src/views/push/components/PushDetail.vue
View file @
7dffab20
...
...
@@ -130,7 +130,7 @@ export default {
},
tempRoute
:
{},
dataObj
:
{
token
:
'fahsdfiwqehfkajsdhfjkasdhfkj'
,
key
:
'fasdhfkasdhfkjashdfkjhasdfads'
},
type
:
'1'
// 图片类型
type
:
1
// 图片类型
}
},
computed
:
{
...
...
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