Hello, everybody!
I've been experimenting with manipulating files through the API recently and I cannot get my selectors to work with Files.
I read about subfield selectors but I cannot get the following code to work:
$myFile = $page->get("basic_page_file.name=6121970044ELEPHPANT.jpg"); // field basic_page_file is of type "Files".
if (!$myFile)
echo "Nothing was found"; // does not get displayed
echo "File name is " . $myFile->name . "<br />"; // nothing is displayed for '$myFile->name'
Actually, neither error nor the name of the file get displayed.
So, I am curious as to what the correct way to use subfield selectors with Files is?