forked from mirror/MrDoc
优化用户TokenAPI图片上传问题
This commit is contained in:
parent
f0d0b08d8d
commit
9bbb74e6f4
@ -293,9 +293,8 @@ def upload_img(request):
|
||||
# {"success": 1, "url": "图片地址"}
|
||||
##################
|
||||
token = request.GET.get('token', '')
|
||||
#base64_img = request.POST.get('data','')
|
||||
base64_img = request.POST.get('data','')
|
||||
try:
|
||||
base64_img = json.loads(request.body.decode("ascii"))['data']
|
||||
# 验证Token
|
||||
token = UserToken.objects.get(token=token)
|
||||
# 上传图片
|
||||
|
Loading…
Reference in New Issue
Block a user