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 created this task.Feb 1 2015, 3:50 PM
DaBPunkt raised the priority of this task from to Medium.
DaBPunkt updated the task description. (Show Details)
DaBPunkt added a project: OTRS.
DaBPunkt added a subscriber: DaBPunkt.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 1 2015, 3:50 PM
XenonX3 added a subscriber: XenonX3.Feb 1 2015, 4:00 PM
Krd added a subscriber: Krd.Feb 1 2015, 4:08 PM
Steinsplitter set Security to None.
Steinsplitter added a subscriber: Steinsplitter.
Krenair removed a project: OTRS.Feb 1 2015, 9:46 PM
Raymond added a subscriber: Raymond.Feb 2 2015, 8:04 AM
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
Reedy added a subscriber: Reedy.Feb 3 2015, 10:45 PM

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

Steinsplitter added a comment.EditedFeb 4 2015, 10:54 AM

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 added a subscriber: gerritbot.

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

Anomie added a subscriber: Anomie.Feb 10 2015, 7:42 PM

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.

Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 18 2015, 8:43 PM

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
Restricted Application added a project: Multimedia. · View Herald TranscriptJul 19 2015, 6:15 PM
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:22 PM
Aklapper removed a subscriber: Anomie.Fri, Oct 16, 5:02 PM