Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: check s3 image url existence #181

Merged
merged 2 commits into from
Aug 29, 2024
Merged

Fix: check s3 image url existence #181

merged 2 commits into from
Aug 29, 2024

Conversation

Pradip-p
Copy link
Collaborator

Description

This PR improves the get_image_dir_url function by adding a check to verify the existence of the image directory in the S3 bucket. Previously, the function generated a URL without confirming whether the directory actually existed. With this change, the function now:

  1. Uses minio_client.list_objects to check if any objects exist in the specified image_dir.
  2. Returns the constructed URL if the directory exists.
  3. Returns None if the directory does not exist.

@Pradip-p Pradip-p added bug Something isn't working backend Related to backend code labels Aug 29, 2024
@Pradip-p Pradip-p requested a review from nrjadkry August 29, 2024 09:15
@Pradip-p Pradip-p self-assigned this Aug 29, 2024
@nrjadkry nrjadkry merged commit 72a066f into develop Aug 29, 2024
2 checks passed
@nrjadkry nrjadkry deleted the fix/image-url branch September 13, 2024 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants