wmill 1.421.0__py3-none-any.whl → 1.421.2__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.
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,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,8 +1,8 @@
1
1
  wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
2
- wmill/client.py,sha256=SHU8gxPbMV8oLuCeDua7aKNWX34KFsckfH6OaSrgPlo,34470
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.0.dist-info/METADATA,sha256=ewUTspvXSl741IoohYI7TEJBpof43wNzDW6KmGOlQJo,2693
7
- wmill-1.421.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
8
- wmill-1.421.0.dist-info/RECORD,,
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,,