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

Get Image by ID Endpoint #21

Open
AhmedFatthy1040 opened this issue Nov 22, 2024 · 0 comments
Open

Get Image by ID Endpoint #21

AhmedFatthy1040 opened this issue Nov 22, 2024 · 0 comments
Assignees
Labels
backend Server-side development tasks. enhancement New feature or request priority-medium For medium-priority issues.

Comments

@AhmedFatthy1040
Copy link
Owner

Create a backend endpoint to retrieve an image by its unique ID. The endpoint should fetch the image metadata from the database and return the image file as a response.

Tasks

  • Create a GET /images/{id} endpoint.
  • Fetch image metadata (e.g., filename, user ID, file path) from the images table using the provided ID.
  • Return the image file in the response.
  • Handle cases where the image ID does not exist and return an appropriate error response (e.g., 404 Not Found).

Acceptance Criteria

  • The endpoint successfully retrieves and returns an image file by its ID.
  • Proper error handling for invalid or non-existent IDs.
@AhmedFatthy1040 AhmedFatthy1040 added enhancement New feature or request backend Server-side development tasks. priority-medium For medium-priority issues. labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Server-side development tasks. enhancement New feature or request priority-medium For medium-priority issues.
Projects
None yet
Development

No branches or pull requests

2 participants