feat: Use inline link for logs to improve readability
All checks were successful
Tests and Linting / Tests-Linting (3.11) (push) Successful in 31s
Tests and Linting / Tests-Linting (3.10) (push) Successful in 36s
Tests and Linting / Tests-Linting (3.13) (push) Successful in 40s
Build Docker / Build Images (map[dockerfile:Dockerfile.hsd tag_suffix:-hsd target:hsd]) (push) Successful in 44s
Build Docker / Build Images (map[dockerfile:Dockerfile tag_suffix: target:default]) (push) Successful in 54s
All checks were successful
Tests and Linting / Tests-Linting (3.11) (push) Successful in 31s
Tests and Linting / Tests-Linting (3.10) (push) Successful in 36s
Tests and Linting / Tests-Linting (3.13) (push) Successful in 40s
Build Docker / Build Images (map[dockerfile:Dockerfile.hsd tag_suffix:-hsd target:hsd]) (push) Successful in 44s
Build Docker / Build Images (map[dockerfile:Dockerfile tag_suffix: target:default]) (push) Successful in 54s
This commit is contained in:
6
main.py
6
main.py
@@ -1249,9 +1249,11 @@ def settings_action(action):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
with open(log_file, 'rb') as f:
|
with open(log_file, 'rb') as f:
|
||||||
response = requests.put(f"https://upload.woodburn.au/{os.path.basename(log_file)}", data=f)
|
response = requests.put(f"https://upload.woodburn.au/{os.path.basename(log_file)}", data=f,
|
||||||
|
headers={"Max-Days": "5"})
|
||||||
if response.status_code == 200 or response.status_code == 201:
|
if response.status_code == 200 or response.status_code == 201:
|
||||||
url = response.text.strip().split('\n')[-1]
|
token = response.text.strip().split('\n')[-1].split('/')[-2:]
|
||||||
|
url = f"https://upload.woodburn.au/inline/{token[0]}/{token[1]}"
|
||||||
logger.info(f"Log upload successful: {url}")
|
logger.info(f"Log upload successful: {url}")
|
||||||
return redirect(url)
|
return redirect(url)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user