php - How would you implement private images? -
i'm developping app in android somehow has avatars whatsapp do. know, in whatsapp can create group, , set group picture it.
i don't have problems on taking image, saving, etc. problem have i'm developing webservice in symfony2 (php) , want receive image , save somewhere on server. however, images not public , should viewed users permissions. i've thought traditional method: saving image on folder , giving link or not, totally easy hack.
so guys, how this? maybe saving binary data mysql directly? there clean way achieve this?
any tips appreciated.
thanks.
another answer set mime type of php call image. call url http://xxx/images.php?id=8989031289130
return image instead of html file.
you have access php security context , can validate whether user has permissions view file.
there more details at: setting mime type in php
Comments
Post a Comment