Unable to import v5 Teleport file to v6

macOS Sonoma 14.3.1 (Latest)
Safari 17.3.1 (Latest)
FireFox 123 (Latest)

I stood up a fresh Pi-hole v6 container and tried to import my v5 teleport file. In both Safari and FireFox, I was unable to select the .tar.gz file generated by v5.

I went into the web inspector and removed the file-type restriction from the input element, and I was able to upload just fine at that point. It looks like this changed from accept="application/gzip" to accept=".zip,.tar.gz" in v6.

I do not have Macs available, but on Linux the file manager understands this and indeed shows you both .tar.gz and .zip files in the directory, hiding everything else. Using Ubuntu (GNOME) I can chose between:

  • Show all files
  • Show supported files (selected by default)
  • Show only .zip
  • Show only .tar.gz

during file selection.

Looking into the documentation of <input type="file">, e.g. on developer.mozilla.org, we see:

A unique file type specifier is a string that describes a type of file that may be selected by the user in an <input> element of type file. Each unique file type specifier may take one of the following forms:

  • A valid case-insensitive filename extension, starting with a period (".") character. For example: .jpg, .pdf, or .doc.
  • A valid MIME type string, with no extensions.
  • The string audio/* meaning "any audio file".
  • The string video/* meaning "any video file".
  • The string image/* meaning "any image file".

We follow exactly no. 1.


Here is more evidence that this is a macOS-related issue:


Changing this from explicitly accepting the filetypes to mimetypes does not seem to be the right thing...

Could you first check if application/gzip,application/zip works in combination on macOS? On Linux, this works but offers to select both zip and gz files (not limited to tar.gz) so it is actually slightly "worse" as selection criterion.

Yes, changing it to application/gzip,application/zip worked.