increase the limit for concurrent file uploads from 4 to 8

master
Aevann 2023-02-26 14:19:30 +02:00
parent ff45099da2
commit 663cdde1f4
4 changed files with 7 additions and 7 deletions

View File

@ -247,9 +247,9 @@ function escapeHTML(unsafe) {
function changename(s1,s2,textarea) {
console.log('nigg')
const files = document.getElementById(s2).files;
if (files.length > 4)
if (files.length > 8)
{
alert("You can't upload more than 4 files at one time!")
alert("You can't upload more than 8 files at one time!")
document.getElementById(s2).value = null
return
}

View File

@ -66,9 +66,9 @@ function hide_image() {
document.onpaste = function(event) {
files = structuredClone(event.clipboardData.files);
if (files.length > 4)
if (files.length > 8)
{
alert("You can't upload more than 4 files at one time!")
alert("You can't upload more than 8 files at one time!")
return
}

View File

@ -27,7 +27,7 @@ def media_ratelimit(v):
def process_files(files, v, body):
if g.is_tor or not files.get("file"): return body
files = files.getlist('file')[:4]
files = files.getlist('file')[:8]
if files:
media_ratelimit(v)
@ -234,7 +234,7 @@ def process_dm_images(v, user, body):
if not request.files.get("file") or g.is_tor or not get_setting("dm_images"):
return ''
files = request.files.getlist('file')[:4]
files = request.files.getlist('file')[:8]
for file in files:
if '<file>' not in body:
abort(400, "Missing <file> in text!")

View File

@ -153,7 +153,7 @@ def comment(v:User):
body, _, options, choices = sanitize_poll_options(v, body, False)
if request.files.get("file") and not g.is_tor:
files = request.files.getlist('file')[:4]
files = request.files.getlist('file')[:8]
if files:
media_ratelimit(v)