Browse Source

Updates Managing Files section on the docs and AUTHORS

master
Arthur Bressan 8 years ago
parent
commit
1cf0e6c198
  1. 1
      AUTHORS
  2. 18
      doc/advanced.rst

1
AUTHORS

@ -22,5 +22,6 @@ Patches and Suggestions
- Artem Serga <artem@serga.name>
- Koblaid
- Julian Gonggrijp (UUDigitalHumanitieslab)
- Arthur de Paula Bressan (ArthurPBressan)
.. and more. If I missed you, let me know.

18
doc/advanced.rst

@ -79,9 +79,27 @@ can use it by adding a FileAdmin view to your app::
path = op.join(op.dirname(__file__), 'static')
admin.add_view(FileAdmin(path, '/static/', name='Static Files'))
FileAdmin also has out-of-the-box support for managing files located on a Amazon Simple Storage Service
bucket. To add it to your app::
from flask_admin import Admin
from flask_admin.contrib.fileadmin.s3 import S3FileAdmin
admin = Admin()
admin.add_view(S3FileAdmin('files_bucket', 'us-east-1', 'key_id', 'secret_key')
You can disable uploads, disable file deletion, restrict file uploads to certain types, etc.
Check :mod:`flask_admin.contrib.fileadmin` in the API documentation for more details.
Adding new file backends
************************
You can also implement your own storage backend by creating a class that implements the same
methods defined in the `LocalFileStorage` class. Check :mod:`flask_admin.contrib.fileadmin` in the
API documentation for details on the methods.
Adding A Redis Console
----------------------

Loading…
Cancel
Save