アップロードのエンドポイントを変更
This commit is contained in:
2
app.py
2
app.py
@@ -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リクエストにファイルの部分がない場合
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user