アップロードのエンドポイントを変更

This commit is contained in:
yuuki
2024-12-05 19:02:46 +09:00
parent 21bd77bb07
commit 45cc38a4d2
2 changed files with 2 additions and 2 deletions

2
app.py
View File

@@ -772,7 +772,7 @@ def send_manifest():
def send_upload(ref):
return cache_wrap(flask.send_from_directory("public/upload", ref), 3600)
@app.route("/upload", methods=["POST"])
@app.route("/api/upload", methods=["POST"])
def upload_file():
try:
# POSTリクエストにファイルの部分がない場合

View File

@@ -2,7 +2,7 @@ function uploadFiles() {
const form = document.querySelector("#upload-form");
const formData = new FormData(form);
fetch("/upload", {
fetch("/api/upload", {
method: "POST",
body: formData,
})