Add image view endpoint for direct image display (#201)
Commit: d6fcc4412e61523058567333a9f1a2de8997a0d0
Date: 2025-07-07 18:49:14 +0200
Author: PascalHavelange
Commit Message
Add image view endpoint for direct image display (#201)
- Added new /api/available-image/{id}/view endpoint for inline image display
- Enhanced AvailableImageController with view() method returning images with Content-Disposition: inline
- Fixed download() method to use proper Laravel response helpers
- Added caching headers (Cache-Control: public, max-age=3600) for optimal performance
- Maintains authentication requirements consistent with existing endpoints
- Updated CHANGELOG.md with both the previous image upload fix and new view endpoint
This enables direct use of image URLs in <img src=''> tags for web applications while maintaining the existing download functionality for file downloads.
Co-authored-by: Pascal HAVELANGE <havelangep@hotmail.com>
Files Changed
- 📝 Modified:
.github/copilot-instructions.md
- 📝 Modified:
CHANGELOG.md
- 📝 Modified:
app/Http/Controllers/AvailableImageController.php
- 📝 Modified:
docs/_openapi/api.json
- 📝 Modified:
routes/api.php
Links
This documentation was automatically generated from Git commit data.