Topic on Extension talk:StlHandler

FrViPofm (talkcontribs)

Hi, I'm trying to install StlHandler on a wiki, on my computer, so I cant send a link to a page. Sorry. The doc says that i must add the lines :

application/sla stl
text/plain stl
application/octet-stream stl

in a mime.types file. I've found no file of that name. I've found a includes/libs/mime/MimeMap.php that already contains mentions to sla and stl :

class MimeMap {
	public const MIME_EXTENSIONS = [
...
		'application/sla' => [ 'stl' ],
...
	];
...
	public const MEDIA_TYPES = [
...
		MEDIATYPE_3D => [
			'application/sla',
		],
...
	];
}

Is it something that must be added ? Where ?

I have uploaded a stl file (33kB, produced with FreeCAD) I have go a preview just after the loading. I could move it. I got the indications : 0 × 0 pixels, file size: 33 Kio, type MIME : application/sla

But when reloadding the page, or checking it on an other browser (Firefox, Chromium), I get nothing more than a grey preview. I still get the indications : 0 × 0 pixels, file size: 33 Kio, type MIME : application/sla

Some hints to explore further ?

Thanks

Ubuntu 20.04, php 7.4.24 MediaWiki 1.36.1, stlHandler 1.0 (2f0b659)

Gota de agua (talkcontribs)

@FrViPofm, I just researched this I think the most recommendable thing is to try to add to the extension the hook MimeMagicInit It is the most I can think of to make this type of extensions work that requires new types of mime.

Reply to "No display"