@@ -77,7 +77,7 @@ Flask-S3 know about your :class:`flask.Flask` application object.
77
77
from flask_s3 import FlaskS3
78
78
79
79
app = Flask(__name__ )
80
- app.config[' S3_BUCKET_NAME ' ] = ' mybucketname'
80
+ app.config[' FLASKS3_BUCKET_NAME ' ] = ' mybucketname'
81
81
s3 = FlaskS3(app)
82
82
83
83
In many cases, however, one cannot expect a Flask instance to be ready
@@ -143,11 +143,11 @@ Setting Custom HTTP Headers
143
143
~~~~~~~~~~~~~~~~~
144
144
145
145
To set custom HTTP headers on the files served from S3 specify what
146
- headers you want to use with the `S3_HEADERS ` option.
146
+ headers you want to use with the `FLASKS3_HEADERS ` option.
147
147
148
148
.. code-block :: python
149
149
150
- S3_HEADERS = {
150
+ FLASKS3_HEADERS = {
151
151
' Expires' : ' Thu, 15 Apr 2010 20:00:00 GMT' ,
152
152
' Cache-Control' : ' max-age=86400' ,
153
153
}
@@ -180,7 +180,7 @@ uploading assets to S3.
180
180
`FLASKS3_CDN_DOMAIN ` AWS makes it easy to attach CloudFront to an S3
181
181
bucket. If you want to use this or another CDN,
182
182
set the base domain here. This is distinct from the
183
- `S3_BUCKET_DOMAIN ` since it will not include the
183
+ `FLASKS3_BUCKET_DOMAIN ` since it will not include the
184
184
bucket name in the base url.
185
185
`FLASKS3_BUCKET_NAME ` The desired name for your Amazon S3 bucket. Note:
186
186
the name will be visible in all your assets' URLs.
@@ -201,17 +201,16 @@ uploading assets to S3.
201
201
`flask.url_for `.
202
202
**Default: ** `True `
203
203
**Note **: if you run your application in `debug `_
204
- mode (and `USE_S3_DEBUG ` is `False ` - see next
205
- item), `USE_S3 ` will be changed to `False `. This
206
- allows the `USE_S3 ` config variable to be the
207
- definitive check as to whether `flask_s3.url_for `
204
+ mode (and `FLASKS3_DEBUG ` is `False ` - see next
205
+ item), `FLASKS3_ACTIVE ` will be changed to `False `.
206
+ This allows the `FLASKS3_ACTIVE ` config variable to be the definitive check as to whether `flask_s3.url_for `
208
207
is overriding `flask.url_for `.
209
208
`FLASKS3_DEBUG ` By default, Flask-S3 will be switched off when
210
209
running your application in `debug `_ mode, so that
211
210
your templates include static asset locations
212
211
specified by `flask.url_for `. If you wish to enable
213
212
Flask-S3 in debug mode, set this value to `True `.
214
- **Note **: if `USE_S3 ` is set to `False ` then
213
+ **Note **: if `FLASKS3_ACTIVE ` is set to `False ` then
215
214
templates will always include asset locations
216
215
specified by `flask.url_for `.
217
216
`FLASKS3_HEADERS ` Sets custom headers to be sent with each file to S3.
@@ -228,17 +227,17 @@ uploading assets to S3.
228
227
`FLASKS3_ONLY_MODIFIED ` Only upload files that have been modified since last
229
228
upload to S3. SHA-1 file hashes are used to compute
230
229
file changes. You can delete `.file-hashes ` from
231
- your S3 bucket to force all files to upload again.ad.
230
+ your S3 bucket to force all files to upload again.
232
231
`FLASKS3_GZIP ` Compress all assets using GZIP and set the
233
232
corresponding Content-Type and Content-Encoding
234
233
headers on the S3 files.
235
234
`FLASKS3_GZIP_ONLY_EXTS ` A list of file extensions that should be gzipped.
236
- `FLASKS3_GZIP ` should be `True ` for this to take effect.
235
+ `` FLASKS3_GZIP `` should be `` True ` ` for this to take effect.
237
236
If mentioned and non-empty, then only files with the
238
237
specified extensions are gzipped.
239
238
Defaults to empty list, meaning all files will be
240
239
gzipped.
241
- Eg:- `['.js', '.css'] ` will gzip only js and css files.
240
+ Eg:- `` ['.js', '.css'] ` ` will gzip only js and css files.
242
241
`FLASKS3_FORCE_MIMETYPE ` Always set the Content-Type header on the S3 files
243
242
irrespective of gzipping. Defaults to `False `.
244
243
=========================== ===================================================
0 commit comments