I've developped an simple FileUploader Service based on the Symfony documentation found here: https://symfony.com/doc/current/controller/upload_file.html
My app is just a simple API called inside a Ionic Mobile App.
What I want to know is what is the best practices to give access to my uploaded images.
For exemple, I have an Sport entity App\Entity\Sport
that stores an image:
When i request GET /api/sports/
I want to send as response the full url to the image so it can be displayed inside the mobile app (e.g. http://symfony/api/public/uploads/sports/XXXXX.jpg)
Maybe I'm overcomplicating the issue but do I need to make an GET /public/uploads/sports/{id}
as an endpoint to get my pictures ? because if possible i would like to have the pictures instantly available after the GET /api/sports
and not having to query another time for the picture aswell