Welcome Guest, Not a member yet? Register   Sign In
Restricting /assets to non logged in users
#3

(08-29-2020, 12:18 PM)jreklund Wrote: You need to move them and make a PHP-reader class, that you point your <img> tags to.

So all users visits e.g /assets/myimage.jpg will actually visit an Controller named Assets that will look for myimage.jpg inside your hidden folder, check if they are logged in and display it, by reading the entire image into memory and setting jpeg headers.

Hi jreklund,

thanks for the fast response!

I am clear about creating a Controller for this purpose but I struggle with reading the image into memory and setting a jpeg header for it.
Can you link me an example?

This would help me out a lot!

Thanks and enjoy your weekend,
Paul
Reply


Messages In This Thread
RE: Restricting /assets to non logged in users - by paulfst - 08-30-2020, 12:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB