Hi, I’m trying to check if a file has been set for an ACF field, that is is not empty, however I’m always getting that it exists even though there’s no file specified in the file field. I’m using the type of ID filed, and “echo $file;” line returns always an id so the problem may be related to that ,but tried with empty check and it doesn’t work as well. This is the current code:
`<?php
$file = get_field(‘file’);
echo $file;
if ($file) {
echo “file is set”;
} else {
echo “file is not set”;
} ?>`