WebHost: set default upload limit to 64 MB, as OoT is chonkers.
WebHost: rename .multidata to .archipelago in a missed flash message WebHost: correctly parse Factorio slot names with "-"
This commit is contained in:
parent
d38e1185bb
commit
c8d6250ada
|
@ -28,7 +28,7 @@ app.config["SELFLAUNCH"] = True
|
||||||
app.config["DEBUG"] = False
|
app.config["DEBUG"] = False
|
||||||
app.config["PORT"] = 80
|
app.config["PORT"] = 80
|
||||||
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
|
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
|
||||||
app.config['MAX_CONTENT_LENGTH'] = 4 * 1024 * 1024 # 4 megabyte limit
|
app.config['MAX_CONTENT_LENGTH'] = 64 * 1024 * 1024 # 64 megabyte limit
|
||||||
# if you want to deploy, make sure you have a non-guessable secret key
|
# if you want to deploy, make sure you have a non-guessable secret key
|
||||||
app.config["SECRET_KEY"] = bytes(socket.gethostname(), encoding="utf-8")
|
app.config["SECRET_KEY"] = bytes(socket.gethostname(), encoding="utf-8")
|
||||||
# at what amount of worlds should scheduling be used, instead of rolling in the webthread
|
# at what amount of worlds should scheduling be used, instead of rolling in the webthread
|
||||||
|
|
|
@ -48,7 +48,7 @@ def upload_zip_to_db(zfile: zipfile.ZipFile, owner=None, meta={"race": False}, s
|
||||||
|
|
||||||
elif file.filename.endswith(".zip"):
|
elif file.filename.endswith(".zip"):
|
||||||
# Factorio mods need a specific name or they do not function
|
# Factorio mods need a specific name or they do not function
|
||||||
_, seed_name, slot_id, slot_name = file.filename.rsplit("_", 1)[0].split("-")
|
_, seed_name, slot_id, slot_name = file.filename.rsplit("_", 1)[0].split("-", 3)
|
||||||
slots.add(Slot(data=zfile.open(file, "r").read(), player_name=slot_name,
|
slots.add(Slot(data=zfile.open(file, "r").read(), player_name=slot_name,
|
||||||
player_id=int(slot_id[1:]), game="Factorio"))
|
player_id=int(slot_id[1:]), game="Factorio"))
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ def uploads():
|
||||||
flush() # place into DB and generate ids
|
flush() # place into DB and generate ids
|
||||||
return redirect(url_for("viewSeed", seed=seed.id))
|
return redirect(url_for("viewSeed", seed=seed.id))
|
||||||
else:
|
else:
|
||||||
flash("Not recognized file format. Awaiting a .multidata file.")
|
flash("Not recognized file format. Awaiting a .archipelago file or .zip containing one.")
|
||||||
return render_template("hostGame.html")
|
return render_template("hostGame.html")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue