▼ 2009/06/21(Sun) PukiWikiの添付ファイルMIME設定
PukiWiki 1.4.7において、Office2007系のファイルを添付し、ダウンロードさせると、MIME設定がapplication/octet-streamになるせいで、IE系ブラウザ(その他はよくわからないが)等において「開く」処理がうまく動かないことがある。
その解決法メモ。
その解決法メモ。
現象
- Office 2007系のファイルをダウンロードすると、保存ダイアログでZIP書庫として認識されてしまう。
- Office PowerPoint 2007(pptx)をそのまま開こうとすると、何故かWord 2007で開こうとして失敗する
解決法
PukiWikiはindex.phpを通してダウンロードさせているので、httpdの設定にMIME設定を足しても解決しない。(cf. httpd.confに書く設定はこちら)というわけで、Wikiのconfigページを開けてそれに追記すればよい。
次のようにアドレスを指定する。
index.php?cmd=read&page=%3Aconfig%2Fplugin%2Fattach%2Fmime-typeすると、mime-typeというページが開くので、このページを編集する。
あらかじめ凍結されているページなので、最初に管理者パスワードで凍結処理を解除する。
次に、編集エリアの最後に以下のように足す。(表の前に空行を開けないように)
|application/vnd.openxmlformats-officedocument.wordprocessingml.document|docx|Office Word 2007 document| |application/vnd.ms-word.document.macroEnabled.12|docm|Office Word 2007 macro-enabled document| |application/vnd.openxmlformats-officedocument.wordprocessingml.template|dotx|Office Word 2007 template| |application/vnd.ms-word.template.macroEnabled.12|dotm|Office Word 2007 macro-enabled template| |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|xlsx|Office Excel 2007 workbook| |application/vnd.ms-excel.sheet.macroEnabled.12|xlsm|Office Excel 2007 macro-enabled workbook| |application/vnd.openxmlformats-officedocument.spreadsheetml.template|xltx|Office Excel 2007 template| |application/vnd.ms-excel.template.macroEnabled.12|xltm|Office Excel 2007 macro-enabled workbook template| |application/vnd.ms-excel.sheet.binary.macroEnabled.12|xlsb|Office Excel 2007 binary workbook| |application/vnd.ms-excel.addin.macroEnabled.12|xlam|Office Excel 2007 add-in| |application/vnd.openxmlformats-officedocument.presentationml.presentation|pptx|Office PowerPoint 2007 presentation| |application/vnd.openxmlformats-officedocument.presentationml.slideshow|ppsx|Office PowerPoint 2007 slide show| |application/vnd.ms-powerpoint.slideshow.macroEnabled.12|ppsm|Office PowerPoint 2007 macro-enabled slide show| |application/vnd.openxmlformats-officedocument.presentationml.template|potx|Office PowerPoint 2007 template| |application/vnd.ms-powerpoint.template.macroEnabled.12|potm|Office PowerPoint 2007 macro-enabled presentation template| |application/vnd.ms-powerpoint.addin.macroEnabled.12|ppam|Office PowerPoint 2007 add-in| |application/vnd.openxmlformats-officedocument.presentationml.slide|sldx|Office PowerPoint 2007 slide| |application/vnd.ms-powerpoint.slide.macroEnabled.12|sldm|Office PowerPoint 2007 macro-enabled slide|最後に凍結処理をかけて完了。
凍結処理のリンクが見あたらないときは、以下のページを開けばよい。
index.php?cmd=attach&page=%3Aconfig%2Fplugin%2Fattach%2Fmime-typeこの設定を行えば、例えばpptxをダウンロードすると、ファイルの種類が"ZIP書庫"ではなく、"Microsoft Office PowerPoint プレゼンテーション"として認識される。
参考になった記事や興味深かった記事は、他の人も見つけやすいようにリンクやはてブしていただけると助かります…。
コメントも歓迎です。
▼ コメント(0件)
- TB-URL http://mo.kerosoft.com/0128/tb/
