wmill 1.421.0__py3-none-any.whl → 1.421.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
wmill/client.py
CHANGED
@@ -486,8 +486,8 @@ class Windmill:
|
|
486
486
|
s3object: S3Object | None,
|
487
487
|
file_content: BufferedReader | bytes,
|
488
488
|
s3_resource_path: str | None,
|
489
|
-
content_type: str | None,
|
490
|
-
content_disposition: str | None,
|
489
|
+
content_type: str | None = None,
|
490
|
+
content_disposition: str | None = None,
|
491
491
|
) -> S3Object:
|
492
492
|
"""
|
493
493
|
Write a file to the workspace S3 bucket
|
@@ -829,11 +829,19 @@ def write_s3_file(
|
|
829
829
|
s3object: S3Object | None,
|
830
830
|
file_content: BufferedReader | bytes,
|
831
831
|
s3_resource_path: str | None = None,
|
832
|
+
content_type: str | None = None,
|
833
|
+
content_disposition: str | None = None,
|
832
834
|
) -> S3Object:
|
833
835
|
"""
|
834
836
|
Upload a file to S3
|
837
|
+
|
838
|
+
Content type will be automatically guessed from path extension if left empty
|
839
|
+
|
840
|
+
See MDN for content_disposition: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
|
841
|
+
and content_type: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type
|
842
|
+
|
835
843
|
"""
|
836
|
-
return _client.write_s3_file(s3object, file_content, s3_resource_path if s3_resource_path != "" else None)
|
844
|
+
return _client.write_s3_file(s3object, file_content, s3_resource_path if s3_resource_path != "" else None, content_type, content_disposition)
|
837
845
|
|
838
846
|
|
839
847
|
@init_global_client
|
@@ -1,8 +1,8 @@
|
|
1
1
|
wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
|
2
|
-
wmill/client.py,sha256=
|
2
|
+
wmill/client.py,sha256=IiUs-eYdIqw8ekxmKO4DWdLfIyrZI2VhsMOqg5Fc0Zc,34892
|
3
3
|
wmill/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
4
4
|
wmill/s3_reader.py,sha256=izHlg2Xsg0Sr_LkDDEC35VuEijJcuPBDIm-xj21KsgU,1668
|
5
5
|
wmill/s3_types.py,sha256=XVjPyc5sjWesTy6nnRReojhyPgPsaT0EY3X57mWUaJ4,1173
|
6
|
-
wmill-1.421.
|
7
|
-
wmill-1.421.
|
8
|
-
wmill-1.421.
|
6
|
+
wmill-1.421.2.dist-info/METADATA,sha256=dcrFIw2QtQhDLRSyP9yEjFpGQI7DwNrvANq3bIqP8cs,2693
|
7
|
+
wmill-1.421.2.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
8
|
+
wmill-1.421.2.dist-info/RECORD,,
|
File without changes
|