Commit 7dffab20 authored by Davve's avatar Davve

修改图片上传类型

parent 24fed907
......@@ -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
}
......@@ -41,7 +41,7 @@ export default {
default: ''
},
type: {
type: String,
type: Number,
default: ''
}
},
......
......@@ -130,7 +130,7 @@ export default {
},
tempRoute: {},
dataObj: { token: 'fahsdfiwqehfkajsdhfjkasdhfkj', key: 'fasdhfkasdhfkjashdfkjhasdfads' },
type: '1' // 图片类型
type: 1 // 图片类型
}
},
computed: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment