I've uploaded a file in a custom form and I can retrieve the file instance like this:
$fid = $form_state->getValue('file'); $file = File::load($fid);
How can I get the contents of the file?
Returns false. If I visit the link manually, it gets downloaded.