Download Images from slim server with angular

Hello
I need help for this:
I have an angular application
My angular aplication uploads images to slim application server (not angular application server)
but when I try to display or download the image there isn’t a route, I can access to folders in the server through php but there is no way to send the image to angular or access to folder in the server or get access to path with .jpg and use that path in angular

How i can create a route with paths of images using slim with angular?

thank you

What have you tried?

Either you save the image files in a public accessible directory or you use a special Slim Route which fetches the files from an internal folder and delivers them.

I think the only way to access something in slim is with a route, if i make public a folder where is the privacy? I have the files names saved in a database, I need a path to folder through a route to use in angular but how I do that?

You would need to write a custom method to stream your file and a midlewar or somting to only allow that route when logedin. Ive done this before and I’ll post an example when I’m at my computer.

use cdn like cloudinary

Check Slim 3 Download Files.