I'm using Google cloud storage for hosting my website, i have code to upload the cover image like Facebook once user select the image it will upload to the server and same time it will fetch the image.
i gave full access to only that cover image folder, if i gave like that any problem will come like hacking. Please give me an advice my ways good or not?
if (!is_dir($directoryName)) {
$oldmask = umask(0);
mkdir($directoryName, 0777);
umask($oldmask);
}