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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wmill
3
- Version: 1.421.0
3
+ Version: 1.421.2
4
4
  Summary: A client library for accessing Windmill server wrapping the Windmill client API
5
5
  Home-page: https://windmill.dev
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wmill"
3
- version = "1.421.0"
3
+ version = "1.421.2"
4
4
  description = "A client library for accessing Windmill server wrapping the Windmill client API"
5
5
  license = "Apache-2.0"
6
6
  homepage = "https://windmill.dev"
@@ -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