mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-24 17:24:43 +01:00
missing f-strings (#490)
This commit is contained in:
parent
3d4dd27220
commit
a6322fae6d
@ -77,7 +77,7 @@ def upload_media():
|
|||||||
files['media_file'] = open(f'{abs}', 'rb')
|
files['media_file'] = open(f'{abs}', 'rb')
|
||||||
response = requests.post(url=f'{BASE_URL}/media', headers=headers, files=files)
|
response = requests.post(url=f'{BASE_URL}/media', headers=headers, files=files)
|
||||||
if response.status_code == 201:
|
if response.status_code == 201:
|
||||||
print("[bold blue]{filename}[/bold blue] successfully uploaded!")
|
print(f"[bold blue]{filename}[/bold blue] successfully uploaded!")
|
||||||
else:
|
else:
|
||||||
print(f'Error: {response.text}')
|
print(f'Error: {response.text}')
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ def upload_media():
|
|||||||
files['media_file'] = open(f'{os.path.abspath(path)}', 'rb')
|
files['media_file'] = open(f'{os.path.abspath(path)}', 'rb')
|
||||||
response = requests.post(url=f'{BASE_URL}/media', headers=headers, files=files)
|
response = requests.post(url=f'{BASE_URL}/media', headers=headers, files=files)
|
||||||
if response.status_code == 201:
|
if response.status_code == 201:
|
||||||
print("[bold blue]{filename}[/bold blue] successfully uploaded!")
|
print(f"[bold blue]{filename}[/bold blue] successfully uploaded!")
|
||||||
else:
|
else:
|
||||||
print(f'Error: {response.text}')
|
print(f'Error: {response.text}')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user