Use fix path!

This commit is contained in:
Patrick Jentsch 2019-09-05 12:00:31 +02:00
parent 78499ee731
commit 0f0c40951b
3 changed files with 3 additions and 4 deletions

View File

@ -12,7 +12,6 @@ MAIL_DEFAULT_SENDER=username@example.com
### Opaque ###
OPAQUE_ADMIN=admin.opaque@example.com
OPAQUE_STORAGE_DIRECTORY=/absolut/path/to/opaque/storage/directory
### Flask-SQLAlchemy ###
# SQLALCHEMY_DATABASE_URI=

View File

@ -26,7 +26,7 @@ def nlp():
db.session.add(nlp_job)
db.session.commit()
dir = os.path.join(current_app.config['OPAQUE_STORAGE'],
dir = os.path.join(current_app.config['OPAQUE_STORAGE_DIRECTORY'],
str(nlp_job.user_id),
'jobs',
str(nlp_job.id))
@ -72,7 +72,7 @@ def ocr():
db.session.add(ocr_job)
db.session.commit()
dir = os.path.join(current_app.config['OPAQUE_STORAGE'],
dir = os.path.join(current_app.config['OPAQUE_STORAGE_DIRECTORY'],
str(ocr_job.user_id),
'jobs',
str(ocr_job.id))

View File

@ -18,7 +18,7 @@ class Config:
''' ### Opaque ### '''
OPAQUE_ADMIN = os.environ.get('OPAQUE_ADMIN')
OPAQUE_STORAGE_DIRECTORY = os.environ.get('OPAQUE_STORAGE_DIRECTORY')
OPAQUE_STORAGE_DIRECTORY = '/opaque_storage'
@staticmethod
def init_app(app):