try to fix path error
Browse files
app.py
CHANGED
|
@@ -11,8 +11,8 @@ from flask import send_file
|
|
| 11 |
logger = logging.getLogger(__name__)
|
| 12 |
logging.basicConfig(level=logging.INFO)
|
| 13 |
|
| 14 |
-
UPLOAD_FOLDER = 'images'
|
| 15 |
-
OUT_FOLDER = 'anno'
|
| 16 |
|
| 17 |
app = Flask(__name__)
|
| 18 |
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0
|
|
@@ -25,9 +25,11 @@ app.config["HEAD"] = 0
|
|
| 25 |
app.config["SESSION_PERMANENT"] = False
|
| 26 |
|
| 27 |
# Ensure the upload directory exists
|
| 28 |
-
if not os.path.exists(os.path.join(os.getcwd(), UPLOAD_FOLDER)):
|
|
|
|
| 29 |
os.makedirs(UPLOAD_FOLDER)
|
| 30 |
-
if not os.path.exists(os.path.join(os.getcwd(), OUT_FOLDER)):
|
|
|
|
| 31 |
os.makedirs(OUT_FOLDER)
|
| 32 |
|
| 33 |
|
|
|
|
| 11 |
logger = logging.getLogger(__name__)
|
| 12 |
logging.basicConfig(level=logging.INFO)
|
| 13 |
|
| 14 |
+
UPLOAD_FOLDER = './images'
|
| 15 |
+
OUT_FOLDER = './anno'
|
| 16 |
|
| 17 |
app = Flask(__name__)
|
| 18 |
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0
|
|
|
|
| 25 |
app.config["SESSION_PERMANENT"] = False
|
| 26 |
|
| 27 |
# Ensure the upload directory exists
|
| 28 |
+
#if not os.path.exists(os.path.join(os.getcwd(), UPLOAD_FOLDER)):
|
| 29 |
+
if not os.path.exists(UPLOAD_FOLDER):
|
| 30 |
os.makedirs(UPLOAD_FOLDER)
|
| 31 |
+
#if not os.path.exists(os.path.join(os.getcwd(), OUT_FOLDER)):
|
| 32 |
+
if not os.path.exists(OUT_FOLDER):
|
| 33 |
os.makedirs(OUT_FOLDER)
|
| 34 |
|
| 35 |
|