Skip to content

Commit

Permalink
Merge pull request #7 from ambujraj/dev
Browse files Browse the repository at this point in the history
qr upload debug
  • Loading branch information
ambujraj authored Jan 13, 2024
2 parents 5296b26 + cee667b commit 1dda1aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions middleware/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ def post_upload_return_link_qr(upload_id: str):
img_bytes_io = io.BytesIO()
img.save(img_bytes_io)

qr_s3_file_name = upload_id + '/QRCode.png'
qr_s3_file_name = upload_id + "/QRCode.png"

# Upload the QR code to S3
try:
s3_client.upload_file(img_bytes_io, S3_BUCKET_NAME, qr_s3_file_name)
s3_client.upload_fileobj(img_bytes_io, S3_BUCKET_NAME, qr_s3_file_name)
except Exception as e:
raise HTTPException(status_code=500, detail=f"An error occurred: {str(e)}")

Expand Down

0 comments on commit 1dda1aa

Please sign in to comment.