fixed a bug when uploading non-images and using preview
This commit is contained in:
parent
f8ce7acd7e
commit
de884b1df9
@ -51,7 +51,11 @@ def upload_local_file(path: str) -> None:
|
||||
url = config.url_template.format(filename)
|
||||
else:
|
||||
url = curl_upload(path)
|
||||
notify_user(url, path)
|
||||
# Only pass the path when uploading an image
|
||||
if re.search(r'\.(png|jpe?g|bmp)$', path):
|
||||
notify_user(url, path)
|
||||
else:
|
||||
notify_user(url)
|
||||
|
||||
|
||||
def prepare_file(ext: str) -> str:
|
||||
|
Loading…
Reference in New Issue
Block a user