catalin12's avatar

What is the best way to store private images?

I have a complex scenario in front of me. Let's say I have the sub-domain client.dom.com. my clients will upload images here. I want these images to not be accessible by anyone on that domain. Now, about the tricky bit, I want to access them (with an authorized user) from the sub-domain admin.dom.com. How could I achieve this? Should I save them in the database? I will store a ton of files over time.

0 likes
1 reply
tchury's avatar

I think you can restrict the access through .htaccess, and you can call a function on admin.dom.com where you do file_get_contents of the file that you need, if this is the problem. Otherwise, you should save in the database

Please or to participate in this conversation.