diff --git a/.env_example b/.env_example index e74e5b7d1f20e79bf4221ff3363e9ce71bfdaf4e..f328a3ed246062bbb393b64f6aff72a80b68a311 100644 --- a/.env_example +++ b/.env_example @@ -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= diff --git a/app/services/views.py b/app/services/views.py index 96247d57aeba03179934b0212ff54bab440d3478..52c36084dc626e8e9b130465f4b49d179f60244c 100644 --- a/app/services/views.py +++ b/app/services/views.py @@ -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)) diff --git a/config.py b/config.py index 836cdcfeaf2de75dad7631a44e3d571ab5ddbd4d..fd0e246cff0ac6d3e427cf39f4f8ba302372e6f0 100644 --- a/config.py +++ b/config.py @@ -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):