Skip to content

Commit

Permalink
Add debug info for uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
maany committed Apr 14, 2024
1 parent ffdc6f3 commit 664f15a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/sdk/file_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ def public_upload(self, signed_url: str, file_path: str) -> None:
with open(file_path, "rb") as f:
upload_res = requests.put(signed_url, data=f, verify=False)

self.logger.info(f"Uploaded file to signed url: {signed_url}")
self.logger.info(f"Upload response: {upload_res.text}")
self.logger.info(f"Upload status code: {upload_res.status_code}")
self.logger.info(f"Upload headers: {upload_res.headers}")

if upload_res.status_code != 200:
raise ValueError(f"Failed to upload file to signed url: {upload_res.text}")

0 comments on commit 664f15a

Please sign in to comment.