rogerxavier
commited on
Commit
•
bbb6b7c
1
Parent(s):
f8c23ec
Update api.py
Browse files
api.py
CHANGED
@@ -192,3 +192,12 @@ async def get_video(dir:str = "/mp4_out/output.mp4")->"video file in header":
|
|
192 |
response.headers["Content-Disposition"] = "attachment; filename=output.mp4"
|
193 |
|
194 |
return response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
response.headers["Content-Disposition"] = "attachment; filename=output.mp4"
|
193 |
|
194 |
return response
|
195 |
+
|
196 |
+
|
197 |
+
#将cover目录下面的0.jpg返回图片作为cover地址
|
198 |
+
@app.get("/cover.jpg")
|
199 |
+
async def get_cover_image():
|
200 |
+
cover_dir = "cover"
|
201 |
+
file_path = os.path.join(cover_dir, "0.jpg")
|
202 |
+
return FileResponse(file_path)
|
203 |
+
|