We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I have followed the documentation and configured flask-fs to use S3 Backend, but when I save a file, it is being saved locally.
App configuration:
>>> app.config <Config { 'JSON_AS_ASCII': True, 'SESSION_REFRESH_EACH_REQUEST': True, u'FS_SERVE': False, u'FS_BACKEND': 's3', 'FS_S3_SECRET_KEY': '**secret key**', u'FS_URL': None, 'SERVICE_TIMEOUT': 5, u'FS_IMAGES_OPTIMIZE': False, 'MAX_CONTENT_LENGTH': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'LOGGER_HANDLER_POLICY': 'always', u'FS_PREFIX': None, 'DATE_FORMAT': '%Y-%m-%d', 'DATE_TIME_FORMAT': '%Y-%m-%d %H:%M', 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'SESSION_COOKIE_PATH': None, 'LOGGER_NAME': 'api.app', 'FS_S3_ACCESS_KEY': '**api key**', u'FS_ROOT': u'/app/instance/fs',' APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'TEMPLATES_AUTO_RELOAD': None, 'FS_S3_ENDPOINT': 'https://s3-us-west-2.amazonaws.com', 'JSONIFY_MIMETYPE': 'application/json', 'USE_X_SENDFILE': False, 'FS_S3_REGION': 'us-west-2', 'SESSION_COOKIE_SECURE': False, 'DEBUG': False, 'EXPLAIN_TEMPLATE_LOADING': False, 'MAX_NUM_IMAGES_PER_EXP': 5, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': datetime.timedelta(0, 43200)}>
in app.py:
app.py
storage = fs.Storage('images', fs.IMAGES, overwrite=True) fs.init_app(app, storage)
but if I execute flask shell:
flask shell
>>> app.extensions {u'fs': {'images': <flask_fs.storage.Storage object at 0x7fd157ea5a10>}} >>> app.extensions.get('fs').get('images') <flask_fs.storage.Storage object at 0x7fd157ea5a10> >>> app.extensions.get('fs').get('images').backend <flask_fs.backends.local.LocalBackend object at 0x7fd157ea5f90>
any insights of what am I doing wrong?
The text was updated successfully, but these errors were encountered:
While I cannot see anything wrong in your configs -
FS_S3_ACCESS_KEY = '.....' FS_S3_SECRET_KEY = '.....' FS_BACKEND = 's3' FS_S3_ENDPOINT = None FS_S3_REGION = None
with
storage = fs.Storage('mybucketname') fs.init_app(app, storage)
worked for me
Sorry, something went wrong.
No branches or pull requests
Hi,
I have followed the documentation and configured flask-fs to use S3 Backend, but when I save a file, it is being saved locally.
App configuration:
in
app.py
:but if I execute
flask shell
:any insights of what am I doing wrong?
The text was updated successfully, but these errors were encountered: