diff --git a/files/routes/posts.py b/files/routes/posts.py index 51eb86004..83df5e098 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -871,7 +871,7 @@ def submit_post(v): new_post.url = upload_ibb(file) else: try: - post_url = upload_imgur(file) + post_url = upload_video(file) new_post.url = post_url thing = gevent.spawn(check_processing_thread, new_post, post_url, g.db) print(thing.started) @@ -890,13 +890,13 @@ def submit_post(v): ), 400 else: if file.content_type.startswith('image/'): - post_url = upload_imgur(file) - new_post.url = post_url - thing = gevent.spawn(check_processing_thread, new_post, post_url, g.db) - print(thing.started) + new_post.url = upload_imgur(file) else: try: - new_post.url = upload_video(file) + post_url = upload_video(file) + new_post.url = post_url + thing = gevent.spawn(check_processing_thread, new_post, post_url, g.db) + print(thing.started) except UploadException as e: if request.headers.get("Authorization"): return {