Which extensions for files are permissible?

I’m working on an extension and I’d like to use my own custom font for some items.

If I bundle the extension files without the woff/woff2/eot files the extension “works” but doesn’t have the font. If I attempt to include the files in the zip process then the upload fails with an unexpected error. Is there a list of failed/permissible extensions, or a way to see why the upload fails? I’d love a log or something I can debug maybe?

I can also provide any fails on request if needed.

Do any of those files that cause the upload to fail have a space in their filename? That’s one of the things that prevents uploads, and font files commonly have spaces in their filenames so that would be the most likely issue here.

2 Likes

Thank you! I didn’t know spaces prevent uploads! Is there a list of rules like that somewhere? I didn’t see anything like that on the Twitch extension list. There’s no spaces but there is a “-” in them. Would that cause an issue?

It’s not a rule, but rather there are some bugs with Extension uploads that may cause them to fail, such as spaces in filenames, or too large a filesize, improper zipping, etc…

As for why those specific font files may not work if they don’t contain spaces, I’m not sure, as personally I don’t use non-standard fonts in my Extensions, so perhaps others here may have another idea why it would be failing.

This is due to spaces in file names are broadly a general no no at all. I could cite endless stack overflows or general forum posts on this. But spaces in the name of files causes problems for all sorts of services and should be avoided in general. (not just limited to fonts, I have no end of issues using S3CMD when I need to fetch a file that has a space in the name that someone else upload to my box, bug I digress)

Just OS’es and various systems don’t care but a space in the name will be encoded to %20 in URI’s which can mess things up.

For AFTER upload: Trace and debug your extension like you would any website.

Common issues with fonts on the web are:

  • URI 404’ed - check network tab
  • Theres a problem with the font itself (normally the index table or other issues in how the font file was constructed) - check console tab
  • Your font “name” has space in it and your CSS rule didn’t wrap the name of the font in ““ so: font-family: Comic Sans MS; is unreliable, but font-family: “Comic Sans MS”; is more reliable.

Now if the upload is failing, could again be badly built font files and/or is tripping any scan checks. But if the upload is screwing what Dist wrote applies. It’s likely zip file size here if all the files in the zip are clear of “invalid” characters for file names (- is find is not generally speaking)