diff --git a/pyshare.py b/pyshare.py index 523b6d1..6eb5f7f 100755 --- a/pyshare.py +++ b/pyshare.py @@ -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: