Set log download attachment name to crawl_id.log (#1280)
Fixes #1271 Using .log for now due to broader support for opening with default viewers --------- Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
This commit is contained in:
parent
aa3f1ebf5f
commit
2383b0d616
@ -918,7 +918,13 @@ def init_crawls_api(
|
||||
resp = await storage_ops.sync_stream_wacz_logs(
|
||||
org, wacz_files, log_levels, contexts
|
||||
)
|
||||
return StreamingResponse(resp)
|
||||
return StreamingResponse(
|
||||
resp,
|
||||
media_type="text/jsonl",
|
||||
headers={
|
||||
"Content-Disposition": f'attachment; filename="{crawl_id}.log"'
|
||||
},
|
||||
)
|
||||
|
||||
raise HTTPException(status_code=400, detail="crawl_not_finished")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user