flask-storage 2.0.4.dev2__py3-none-any.whl → 2.0.4.dev3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -228,6 +228,10 @@ class S3Backend(BaseBackend):
228
228
  # so it has to be set at write time; it defaults to binary/octet-stream.
229
229
  if content_type := files.mime(filename):
230
230
  extra_args["ContentType"] = content_type
231
+ # An SVG opened on its own runs the scripts it holds, on the origin of the bucket: it
232
+ # is downloaded instead. An `<img>` ignores the header and still displays it.
233
+ if content_type == "image/svg+xml":
234
+ extra_args["ContentDisposition"] = "attachment"
231
235
  # Have S3 checksum what it receives and store the result with the
232
236
  # object, so a corrupted transfer is rejected instead of being stored,
233
237
  # and `get_metadata` has a digest of the content to report. CRC32 is
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flask-storage
3
- Version: 2.0.4.dev2
3
+ Version: 2.0.4.dev3
4
4
  Summary: Simple and easy file storages for Flask
5
5
  Author-email: Etalab <etalab@data.gouv.fr>
6
6
  Project-URL: Home, https://github.com/etalab/flask-storage
@@ -9,10 +9,10 @@ flask_storage/views.py,sha256=YngzSXuxwiT-GQFLNWrXk0SrPcyKmbrDCOubMt3Wo9g,325
9
9
  flask_storage/backends/__init__.py,sha256=thajBIF5Ok5zAiLEZmYBHwTxjmtD6_-Y1kXnNYQH5ws,4051
10
10
  flask_storage/backends/local.py,sha256=ooPnw2lZyX_sLgluK4sC1rQHaSBif7TPVwP0R66oNiM,4423
11
11
  flask_storage/backends/mock.py,sha256=0-b6SfzIuVO5Uu8BlSz1uNNALyBGNHePz5o79Ef1aOw,185
12
- flask_storage/backends/s3.py,sha256=CV8rwaFSUJOk5pTz4pOv_z679FZD1nuJ9NC9cJswK44,10045
13
- flask_storage-2.0.4.dev2.dist-info/licenses/LICENSE,sha256=Jsa1CKm-fF0guY0ht3reKgv2D3ReoCjNVX0IPtreqSE,1081
14
- flask_storage-2.0.4.dev2.dist-info/METADATA,sha256=fN5UqwEBKwxZpliRl76DqPtzAdfhwhmBtLiY1XJGGno,1312
15
- flask_storage-2.0.4.dev2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
16
- flask_storage-2.0.4.dev2.dist-info/entry_points.txt,sha256=hX7fv5H16y_4DLa-TJKZrdSqcddfRo1AEFSN3oH0cHs,156
17
- flask_storage-2.0.4.dev2.dist-info/top_level.txt,sha256=dewU5rlVVfXSOtwXxhCTSujH1TX9-8SXFK9L67Lux3U,14
18
- flask_storage-2.0.4.dev2.dist-info/RECORD,,
12
+ flask_storage/backends/s3.py,sha256=p_EBPjbgIbXZ1rjr7BNJL4HRNKxzzVCo5YCZKoaPhbs,10329
13
+ flask_storage-2.0.4.dev3.dist-info/licenses/LICENSE,sha256=Jsa1CKm-fF0guY0ht3reKgv2D3ReoCjNVX0IPtreqSE,1081
14
+ flask_storage-2.0.4.dev3.dist-info/METADATA,sha256=8fHB79tB5FCMmRUAiNkeBBLCux-PR5tmMPVsVMKjaP8,1312
15
+ flask_storage-2.0.4.dev3.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
16
+ flask_storage-2.0.4.dev3.dist-info/entry_points.txt,sha256=hX7fv5H16y_4DLa-TJKZrdSqcddfRo1AEFSN3oH0cHs,156
17
+ flask_storage-2.0.4.dev3.dist-info/top_level.txt,sha256=dewU5rlVVfXSOtwXxhCTSujH1TX9-8SXFK9L67Lux3U,14
18
+ flask_storage-2.0.4.dev3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (84.0.0)
2
+ Generator: setuptools (84.2.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5