Im trying to check if a file exist on my /uploads folder of symfony 2.
$file = $this->getAssetUrl('/uploads/hd/'.$gift->getImage());
if(file_exists($file)) return $this->getAssetUrl('/uploads/hd/'.$gift->getImage());
else return $this->getAssetUrl('/uploads/large/'.$gift->getImage());
This is always returning false, i debugged all the strings and the paths are correct, checked by hand that the file exist. Any ideas?