This issue just started occurring on our app. We allow users to upload files in our forms and we create links for those files like so;
$f = \Drupal::entityTypeManager()->getStorage('file')->load($file->value);
if ($f) {
$fileLink = [
'title' => $f->get('filename')->value,
'link' => \Drupal::service('file_url_generator')->generateAbsoluteString($f->get('uri')->value),
];
$fileLinks[] = $fileLink;
}
Nothing special.
Our default download method is "Public local files served by the webserver."
The issue is that as of last week all files, regardless of mime, display as bytecode and not the file.
The url to this file is direct with extension, so its not being served from Drupal, meaning no mime issues. I can open the file perfectly fine and if you right click and save as, the file downloads and opens fine.
Appreciate the help.