diff --git a/drama/helpers/aws.py b/drama/helpers/aws.py index a1d14944b..24eb7bd78 100644 --- a/drama/helpers/aws.py +++ b/drama/helpers/aws.py @@ -80,8 +80,6 @@ def upload_file(name, file, resize=None): print(e) print(req) print(req.text) - if "File type invalid" in str(req.text): return "sex" - else: return new_image = Image( text=url, diff --git a/drama/routes/posts.py b/drama/routes/posts.py index fd7df94b8..6a73824b2 100644 --- a/drama/routes/posts.py +++ b/drama/routes/posts.py @@ -34,10 +34,11 @@ def resize(): file.write(chunk) image = upload_from_file("resizing", "resizing", (100, 100)) - if image == "sex": + if image == None: + send_notification(1, u, "fail!") u.resized = True g.db.add(u) - elif image != None: + else: u.profileurl = image u.resized = True g.db.add(u)