Commit 4975d12f authored by ZZH's avatar ZZH

fix file upload 2024-03-8

parent 961562b0
......@@ -23,9 +23,9 @@ async def post_publish_news(request, *args, **kwargs) -> SuccessRsp:
is_success, news_url, cover_url = await upload_news_qs(request)
if is_success:
form = request.form
d_news_info = dict(title=form.title, author=form.author,
pub_time=form.pub_time,
news_type=int(form.news_type))
d_news_info = dict(title=form.get("title"), author=form.get("author"),
pub_time=form.get("pub_time"),
news_type=int(form.get("news_type")))
await save_news_info(d_news_info, news_url, cover_url)
return SuccessRsp(success=1, message="发布文章成功")
......
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