Page MenuHomePhabricator

Fix upload of compressed dia files
Open, MediumPublic

Description

At the moment the upload of dia-files (for flowcharts) is not possible in the OTRS-wiki. While the upload-formular says that »dia« is a allowed file-ending, the wiki denies the upload with a complain about the MIME-type »application/x-gzip«.

Event Timeline

DaBPunkt raised the priority of this task from to Medium.
DaBPunkt updated the task description. (Show Details)
DaBPunkt added a project: Znuny.
DaBPunkt subscribed.
Aklapper renamed this task from Allow dia-upload for otrs-wiki to Allow upload of dia files for otrs-wiki.Feb 2 2015, 6:14 PM

I suspect this is a MW core/uploading bug, rather than a site request specifically

Maybe https://noc.wikimedia.org/conf/highlight.php?file=CommonSettings.php needs a change?:

	# Dia Diagrams files --fred.
	$wgFileExtensions[] = 'dia';
	// To allow OpenOffice doc formats we need to not blacklist zip files
	$wgMimeTypeBlacklist = array_diff(
		$wgMimeTypeBlacklist,
		array( 'application/zip' ) );

application/x-gzip seems not whitelisted, only application/zip

gerritbot subscribed.

Change 188557 had a related patch set uploaded (by Steinsplitter):
To allow dia-files (for flowcharts) we need to whitelist x-gzip

https://gerrit.wikimedia.org/r/188557

Patch-For-Review

Change 188557 merged by jenkins-bot:
To allow dia-files (for flowcharts) we need to whitelist x-gzip

https://gerrit.wikimedia.org/r/188557

application/x-gzip seems not whitelisted, only application/zip

This turns out not to be the case, as application/x-gzip is not blacklisted to begin with.

What's going on here is that a "compressed" dia file is really just a gzipped dia file, which is detected as "application/x-gzip" rather than "application/x-dia-diagram". This is technically correct, but not terribly helpful. It's also reminiscent of T6947.

If nothing else, you could uncompress your compressed dia files before uploading them.

So, my understanding of this is that you can upload .dia files, but if they're compressed then you hit a bug in MediaWiki? If that's correct we should close this.

So, my understanding of this is that you can upload .dia files, but if they're compressed then you hit a bug in MediaWiki? If that's correct we should close this.

I can not upload dia-files, because they are compressed by the dia-program by default (like in OpenOffice). You could say, that it is normal for them to be compressed.

Krenair renamed this task from Allow upload of dia files for otrs-wiki to Fix upload of compressed dia files.Jul 19 2015, 6:15 PM