diff --git a/files/routes/discord.py b/files/routes/discord.py index 86bf0873d..18bb506f2 100644 --- a/files/routes/discord.py +++ b/files/routes/discord.py @@ -2,6 +2,7 @@ from files.helpers.wrappers import * from files.helpers.security import * from files.helpers.discord import add_role from files.__main__ import app +import requests SERVER_ID = environ.get("DISCORD_SERVER_ID",'').strip() CLIENT_ID = environ.get("DISCORD_CLIENT_ID",'').strip() diff --git a/files/routes/posts.py b/files/routes/posts.py index 86867537b..c0832fa2d 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -840,10 +840,10 @@ def submit_post(v): file.save(name) new_post.url = process_image(name) - elif file.content_type.startswith('video/'): - file.save("video.mp4") - with open("video.mp4", 'rb') as f: - new_post.url = requests.post('https://catbox.moe/user/api.php', data={'userhash':CATBOX_KEY, 'reqtype':'fileupload'}, files={'fileToUpload':f}).text + # elif file.content_type.startswith('video/'): + # file.save("video.mp4") + # with open("video.mp4", 'rb') as f: + # new_post.url = requests.post('https://catbox.moe/user/api.php', data={'userhash':CATBOX_KEY, 'reqtype':'fileupload'}, files={'fileToUpload':f}).text g.db.add(new_post) diff --git a/files/templates/submit.html b/files/templates/submit.html index 1fde8f2a0..c8e01a847 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -73,7 +73,7 @@
-
+
Optional if you have text. - You can upload videos up to 1 minute long. +