- π¨πSwitzerland tcrawford
I was suddenly seeing this issue on Drupal 10.2 where we have file_entity still installed.
The missing mime-type was "application/octet-stream" when uploading a pdf via a managed file widget.
To debug, place a stop point in the function file_entity_file_type(FileInterface $file) to determine what the mime type is that is not resolving.
Add the missing mime type to an existing (or new) file type at /admin/structure/file-types
A more sustainable solution would be to migrate away from file_entity. - πΊπ¦Ukraine ankondrat4 Lutsk
Hello.
I have the similar issue after upgrading Drupal core to 2.5.6 version.
Adding "application/octet-stream" to one of file type at /admin/structure/file-types temporary resolved the issue, but didn't in common. If you have many file types, the file type of uploaded file will be assigned to the first which has this mime "application/octet-stream" as allowed.Steps to reproduce:
- Drupal core 10.2.6
- Create file types: Document, Image, Video
- Add to file type Document mime "application/octet-stream"
- Add to file type Image mime "image/*"
- Add to file type Video mime "video/*"
- Upload some image in field of your CT
- Check which type was assigned to your file on admin/content/files and see that it is "Document", not "Image" - πΊπ¦Ukraine ankondrat4 Lutsk
For resolving described issue in Drupal 10.2.6 need to apply patch from here https://www.drupal.org/project/file_entity/issues/3112300#comment-13811330 β
- Merge request !15Issue #2927468: PluginNotFoundException for entity:file:undefined when editing... β (Open) created by ankondrat4
- Status changed to Needs review
4 months ago 7:10am 10 July 2024 - Status changed to Active
4 months ago 7:26am 10 July 2024 - π¨π¦Canada joseph.olstad
pretty sure that the test fail is not related to this MR
- π¨π¦Canada joseph.olstad
https://git.drupalcode.org/project/file_entity/-/merge_requests/15.diff this is the patch
- Status changed to Needs review
4 months ago 9:53pm 15 July 2024