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.
- flask_storage/backends/s3.py +4 -0
- {flask_storage-2.0.4.dev2.dist-info → flask_storage-2.0.4.dev3.dist-info}/METADATA +1 -1
- {flask_storage-2.0.4.dev2.dist-info → flask_storage-2.0.4.dev3.dist-info}/RECORD +7 -7
- {flask_storage-2.0.4.dev2.dist-info → flask_storage-2.0.4.dev3.dist-info}/WHEEL +1 -1
- {flask_storage-2.0.4.dev2.dist-info → flask_storage-2.0.4.dev3.dist-info}/entry_points.txt +0 -0
- {flask_storage-2.0.4.dev2.dist-info → flask_storage-2.0.4.dev3.dist-info}/licenses/LICENSE +0 -0
- {flask_storage-2.0.4.dev2.dist-info → flask_storage-2.0.4.dev3.dist-info}/top_level.txt +0 -0
flask_storage/backends/s3.py
CHANGED
|
@@ -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
|
|
@@ -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=
|
|
13
|
-
flask_storage-2.0.4.
|
|
14
|
-
flask_storage-2.0.4.
|
|
15
|
-
flask_storage-2.0.4.
|
|
16
|
-
flask_storage-2.0.4.
|
|
17
|
-
flask_storage-2.0.4.
|
|
18
|
-
flask_storage-2.0.4.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|