Extension talk:Silverlight

From mediawiki.org
Latest comment: 12 years ago by 72.211.252.69 in topic Mime-type Issue

This doesn't seem to work. I get the following error when I try to upload my XAP:

Upload warning The file is corrupt or has an incorrect extension. Please check the file and upload again.

Might need to add .xap files to the list of allowed extensions...Manual:$wgFileExtensions --12.32.90.76 17:36, 20 September 2011 (UTC)Reply

Malicious code[edit]

Malicious code? --72.211.252.69 23:10, 3 September 2011 (UTC)Reply

Mime-type Issue[edit]

When I try and upload a xap file I keep getting an error stating that the "File extension does not match MIME type". I've added xap to my /etc/mime.types file and added to allowed files in LocalSettings.ini but no joy. Anyone got any info on mime settings for xap files please? --RichyL 01:12, 25 September 2011 (UTC)Reply

See above on adding .xap to list of allowed --72.211.252.69 03:25, 20 January 2012 (UTC)Reply

Script changes in MediaWiki 1.18[edit]

Under MediaWiki 1.18 this script does not work because the Image class was removed in this version. I changed the getXapPath function to this and now it is working again:

 function getXapPath($file) {
           $title = Title::makeTitleSafe("Image",$file);
           $repo = RepoGroup::singleton()->getLocalRepo();
           $img = new LocalFile($title,$repo);
           $path = $img->getViewURL(false);
           return $path;
}