mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-10 06:20:55 +08:00
removed trailing slash from render_annotations
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
|
||||
import json
|
||||
import logging
|
||||
|
||||
# import BaseHTTPServer
|
||||
import os
|
||||
from threading import Lock, Thread
|
||||
|
||||
@@ -24,8 +22,9 @@ from flask import (
|
||||
url_for,
|
||||
)
|
||||
from flask_api import status
|
||||
from werkzeug.utils import secure_filename
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
from werkzeug.utils import secure_filename
|
||||
|
||||
from cellxgene_gateway import env
|
||||
from cellxgene_gateway.backend_cache import BackendCache
|
||||
from cellxgene_gateway.cache_entry import CacheEntryStatus
|
||||
@@ -163,11 +162,7 @@ def upload_file():
|
||||
if "file" in request.files:
|
||||
f = request.files["file"]
|
||||
if f and f.filename.endswith(".h5ad"):
|
||||
f.save(
|
||||
os.path.join(
|
||||
full_upload_path, secure_filename(f.filename)
|
||||
)
|
||||
)
|
||||
f.save(os.path.join(full_upload_path, secure_filename(f.filename)))
|
||||
return redirect(url_for("filecrawl"), code=302)
|
||||
else:
|
||||
raise CellxgeneException(
|
||||
@@ -180,21 +175,15 @@ def upload_file():
|
||||
status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
else:
|
||||
raise CellxgeneException(
|
||||
"Invalid directory.", status.HTTP_400_BAD_REQUEST
|
||||
)
|
||||
raise CellxgeneException("Invalid directory.", status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
return redirect(url_for("index"), code=302)
|
||||
|
||||
|
||||
if env.enable_upload:
|
||||
app.add_url_rule("/make_user", "make_user", make_user, methods=["POST"])
|
||||
app.add_url_rule(
|
||||
"/make_subdir", "make_subdir", make_subdir, methods=["POST"]
|
||||
)
|
||||
app.add_url_rule(
|
||||
"/upload_file", "upload_file", upload_file, methods=["POST"]
|
||||
)
|
||||
app.add_url_rule("/make_subdir", "make_subdir", make_subdir, methods=["POST"])
|
||||
app.add_url_rule("/upload_file", "upload_file", upload_file, methods=["POST"])
|
||||
|
||||
|
||||
def set_no_cache(resp):
|
||||
|
||||
Reference in New Issue
Block a user