forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-05-23 21:13:33 +02:00
parent 2f3cb7918d
commit 9599a7e96d
1 changed files with 2 additions and 3 deletions

View File

@ -13,8 +13,7 @@ def process_audio(file):
name = f'/audio/{time.time()}'.replace('.','') + '.mp3'
file.save(name)
size = os.stat(name).st_size
if size > 8 * 1024 * 1024:
if SITE_NAME == 'WPD' or os.stat(name).st_size > 8 * 1024 * 1024:
with open(name, 'rb') as f:
os.remove(name)
req = requests.request("POST", "https://pomf2.lain.la/upload.php", files={'files[]': f}, timeout=20).json()
@ -32,7 +31,7 @@ def process_video(file):
name += '.mp4'
size = os.stat(name).st_size
if size > 8 * 1024 * 1024:
if SITE_NAME == 'WPD' or os.stat(name).st_size > 8 * 1024 * 1024:
with open(name, 'rb') as f:
os.remove(name)
req = requests.request("POST", "https://pomf2.lain.la/upload.php", files={'files[]': f}, timeout=20).json()