Octet-Stream files and Firefox

User Help for Mozilla Firefox
Post Reply
User avatar
arturox
Posts: 52
Joined: January 30th, 2019, 3:20 am

Octet-Stream files and Firefox

Post by arturox »

Win 10 Pro (Fully updated) and as I write this Firefox version 72.0.2.
Not specifically a Firefox question, but as I only use Firefox for browsing, I'm having troubles...

The Local council planning website had changed its file methodology, from files with a dot suffix to an Octet-Stream file, name or number without any .suffix.

Consequently Firefox doesn't know what to do with the file, and as far as as I can deduce neither can anything else. :-/

So what is a fellow to do, aside from downloading the damn file, shoving it in an advanced text editor, examining the header data for clues, then giving the file a suitable .suffix (Quite often .pdf) though it can be Word, or Jpg etc.

No a very efficient use of time when there's a lot of work to be done.

Anyone have any bright ideas/solutions?

Thanks
Ax
User avatar
malliz
Folder@Home
Posts: 43796
Joined: December 7th, 2002, 4:34 am
Location: Australia

Re: Octet-Stream files and Firefox

Post by malliz »

Sounds like the server is not configured properly
What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"
siffemoz
Posts: 254
Joined: January 29th, 2016, 4:36 pm

Re: Octet-Stream files and Firefox

Post by siffemoz »

Assuming you know it's an octet-stream file, you could choose to open it with Free File Viewer instead of downloading/investigating/renaming.

https://www.freefileviewer.com/
User avatar
arturox
Posts: 52
Joined: January 30th, 2019, 3:20 am

Re: Octet-Stream files and Firefox

Post by arturox »

I know it's going to present/download as an octet-stream file, that's the problem, even something like Freefileviewer doesn't know what to do with it without a dot suffix.

And, yes FFV does display something, but not in a usable form.

Ax
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Octet-Stream files and Firefox

Post by morat »

TrID is an utility designed to identify file types from their binary signatures.

TrID File Identifier
http://mark0.net/soft-trid-e.html

TrID File Type Definitions
http://mark0.net/soft-trid-deflist.html
http://file-extension.net/seeker/file_extension_pdf

TrID Forum
http://mark0.net/forum/
kreemoweet
Posts: 778
Joined: December 30th, 2009, 11:25 pm

Re: Octet-Stream files and Firefox

Post by kreemoweet »

If you can get those files onto a machine with a Linux OS, there's almost always a utility running that
automatically examines files and gives a good guess as to the type, without any need for a file-type suffix.
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Octet-Stream files and Firefox

Post by therube »

Seems silly they don't serve the correct file type.
Have you asked about it?
What do they do on their end?
What do others do who happen to receive a type-less file? (I'd imagine, nothing at all.)

Yes, UNIX file command should work, even on windows.

Code: Select all

C:\LeechFTP>file_gnuwin32.exe  -m C:\BIN\UNIX\magic  ss-gmes9267d6490022fa6258827eff0a00754798
ss-gmes9267d6490022fa6258827eff0a00754798; PDF document, version 1.4
With a list (from file), perhaps you could automate something, pulling the name part, the "type" part (or part of it) & make a "file" out of it ;-).
> ss-gmes9267d6490022fa6258827eff0a00754798.pdf

For images types (& more ?), I believe Irfanview will (as you page through a list of filenames) prompt you to rename the file with the correct (expected) extension.
Like if the file was named test.jpg & Irfanview sees that it is actually a .png, it will prompt you to rename to test.png.
Similarly a .png named "test" (no extension) should prompt you to rename as "test.png".

file.bat:

Code: Select all

file_gnuwin32.exe  -m C:\BIN\UNIX\magic  %1 %2 %3
(I renamed file.exe to file_gnuwin32.exe, but the reason escapes me presently.
magic, is the "magic" file. magic.dll [& magic & magic.mgc] are included in file-5.03-bin.zip. [I see there is also file-5.03-dep.zip, dependencies, might be needed?)

---

(TriD is [also] used in/by Uniextract)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Octet-Stream files and Firefox

Post by morat »

Here is the package page for the File utility.

GnuWin Packages
http://gnuwin32.sourceforge.net/packages.html

File 5.03 (determine file type)
http://gnuwin32.sourceforge.net/packages/file.htm
User avatar
arturox
Posts: 52
Joined: January 30th, 2019, 3:20 am

Re: Octet-Stream files and Firefox

Post by arturox »

With a list (from file), perhaps you could automate something, pulling the name part, the "type" part (or part of it) & make a "file" out of it

As noted in my original posting, something I've been doing for years with all sorts of .suffixless files..."shoving it in an advanced text editor, examining the header data for clues, then giving the file a suitable .suffix ", But it would be nice to be able to do away with that rigmarole.

Of course that would require stupid people to name their file correctly.

Ax
Post Reply