fix: some fixes
This commit is contained in:
@@ -172,6 +172,10 @@ def upload_ad_image(
|
||||
id=campaign_id,
|
||||
advertiser_id=advertiser_id,
|
||||
)
|
||||
if ad_image.size >= 10 * 1024 * 1024:
|
||||
raise HttpError(
|
||||
status.BAD_REQUEST, "File can't be bigger than 10MB."
|
||||
)
|
||||
try:
|
||||
Image.open(ad_image).verify()
|
||||
except (OSError, SyntaxError):
|
||||
|
||||
Reference in New Issue
Block a user