mirror of
https://github.com/caronc/apprise-api.git
synced 2025-08-23 12:20:20 +02:00
bugfix: APPRISE_ATTACH_SIZE correctly manages attachment size (#177)
This commit is contained in:
@@ -629,11 +629,11 @@ class NotifyView(View):
|
||||
attach = parse_attachments(
|
||||
content.get('attachment'), request.FILES)
|
||||
|
||||
except (TypeError, ValueError):
|
||||
except (TypeError, ValueError) as e:
|
||||
# Invalid entry found in list
|
||||
logger.warning(
|
||||
'NOTIFY - %s - Bad attachment specified',
|
||||
request.META['REMOTE_ADDR'])
|
||||
'NOTIFY - %s - Bad attachment: %s',
|
||||
request.META['REMOTE_ADDR'], str(e))
|
||||
|
||||
return HttpResponse(
|
||||
_('Bad attachment'),
|
||||
@@ -1177,11 +1177,11 @@ class StatelessNotifyView(View):
|
||||
attach = parse_attachments(
|
||||
content.get('attachment'), request.FILES)
|
||||
|
||||
except (TypeError, ValueError):
|
||||
except (TypeError, ValueError) as e:
|
||||
# Invalid entry found in list
|
||||
logger.warning(
|
||||
'NOTIFY - %s - Bad attachment specified',
|
||||
request.META['REMOTE_ADDR'])
|
||||
'NOTIFY - %s - Bad attachment: %s',
|
||||
request.META['REMOTE_ADDR'], str(e))
|
||||
|
||||
return HttpResponse(
|
||||
_('Bad attachment'),
|
||||
|
Reference in New Issue
Block a user