mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-22 00:03:28 +01:00
cli.py missing f string (#877)
This commit is contained in:
parent
92c0ff579a
commit
fdff0811a1
@ -73,7 +73,7 @@ def upload_media():
|
|||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
for filename in os.listdir(path):
|
for filename in os.listdir(path):
|
||||||
files = {}
|
files = {}
|
||||||
abs = os.path.abspath("{path}/{filename}")
|
abs = os.path.abspath(f"{path}/{filename}")
|
||||||
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user