Drupal 10 issue

When uploading a custom WOFF font using FontYourFace module in /admin/appearance/font/local_font_config_entity/add, error appears. Seems to happen if you have File Entity module enabled:

Error message: The specified file .woff could not be uploaded. The referenced entity (file_type: undefined) does not exist.

The-specified-file-woff-could-not-be-uploaded-referenced-entity-filetype-undefined-does-not-exist

Solution

Add the MIME Type in the File Type in /admin/structure/file-types/manage/

Create for instance Fonts File Type, then under the Mime Type add the following to support WOFF files, then save. In our experience, you simply need application/octet-stream, but the other types may be useful, too:

application/x-font
application/octet-stream
application/woff

add-file-and-mime-types-applications-xfont-octet-stream-woll

After this, the uploading of the WOFF files should now work and you are now able to create your custom fonts using FontYourFace module.

Other similar issues and references