We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14b0410 commit 603797cCopy full SHA for 603797c
1 file changed
src/fastapi_cloud_cli/commands/deploy.py
@@ -193,13 +193,13 @@ def _upload_deployment(deployment_id: str, archive_path: Path) -> None:
193
upload_data = model_validate(RequestUploadResponse, response.json())
194
logger.debug("Received upload URL: %s", upload_data.url)
195
196
- # Upload the archive
197
logger.debug("Starting file upload to S3")
198
- upload_response = client.post(
199
- upload_data.url,
200
- data=upload_data.fields,
201
- files={"file": archive_path.open("rb")},
202
- )
+ with open(archive_path, "rb") as archive_file:
+ upload_response = client.post(
+ upload_data.url,
+ data=upload_data.fields,
+ files={"file": archive_file},
+ )
203
204
upload_response.raise_for_status()
205
logger.debug("File upload completed successfully")
0 commit comments