Commit 3256aa9f authored by ZZH's avatar ZZH

fix file upload 2024-03-8

parent 4975d12f
...@@ -25,6 +25,8 @@ async def post_publish_news(request, *args, **kwargs) -> SuccessRsp: ...@@ -25,6 +25,8 @@ async def post_publish_news(request, *args, **kwargs) -> SuccessRsp:
form = request.form form = request.form
d_news_info = dict(title=form.get("title"), author=form.get("author"), d_news_info = dict(title=form.get("title"), author=form.get("author"),
pub_time=form.get("pub_time"), pub_time=form.get("pub_time"),
keywords=form.get("keywords"),
contents=form.get("contents"),
news_type=int(form.get("news_type"))) news_type=int(form.get("news_type")))
await save_news_info(d_news_info, news_url, cover_url) await save_news_info(d_news_info, news_url, cover_url)
return SuccessRsp(success=1, message="发布文章成功") 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