wmill 1.421.0__tar.gz → 1.421.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {wmill-1.421.0 → wmill-1.421.2}/PKG-INFO +1 -1
- {wmill-1.421.0 → wmill-1.421.2}/pyproject.toml +1 -1
- {wmill-1.421.0 → wmill-1.421.2}/wmill/client.py +11 -3
- {wmill-1.421.0 → wmill-1.421.2}/README.md +0 -0
- {wmill-1.421.0 → wmill-1.421.2}/wmill/__init__.py +0 -0
- {wmill-1.421.0 → wmill-1.421.2}/wmill/py.typed +0 -0
- {wmill-1.421.0 → wmill-1.421.2}/wmill/s3_reader.py +0 -0
- {wmill-1.421.0 → wmill-1.421.2}/wmill/s3_types.py +0 -0
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|