mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-19 17:47:25 -05:00
save sysinfo as .json
GitHub now allows uploading of .json files in issues
This commit is contained in:
@@ -1308,7 +1308,7 @@ def setup_ui_api(app):
|
||||
from fastapi.responses import PlainTextResponse
|
||||
|
||||
text = sysinfo.get()
|
||||
filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.txt"
|
||||
filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.json"
|
||||
|
||||
return PlainTextResponse(text, headers={'Content-Disposition': f'{"attachment" if attachment else "inline"}; filename="{filename}"'})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user