멀티미디어에 대한 처리를 좀 더 원활히 하는 부분은 Extension:MultimediaViewer을 통해서 구현해 보고자 시도중에 있습니다. 그러나 파일을 서버에 저장하는 것이 하나씩만 가능할 때에는 저장 자체가 매우 힘든 과정으로 느껴질 수 있습니다. 그래서 많은 파일을 동시에 올리기가 가능한 확장을 설치해 보고자 합니다.
Installation
개발자 git 서버에서 소스 코드를 가져옵니다.
- cd /var/www/html/w/extensions
- sudo git clone https://github.com/wikimedia/mediawiki-extensions-MsUpload
- sudo mv mediawiki-extensions-MsUpload MsUpload
Configurations
미디어위키 설정 LocalSettings.php 파일에 다음을 추가합니다:
wfLoadExtension( 'MsUpload' );
$wgMSU_useDragDrop = true; // Should the drag & drop area be shown? (Not set by default)
$wgMSU_showAutoCat = true; // If true, files uploaded while editing a category will be added to that category
$wgMSU_checkAutoCat = true; // Whether the checkbox for the above mentioned case is checked by default
$wgMSU_useMsLinks = false; // Should we allow to insert links in the style of the Extension:MsLinks?
$wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox
$wgMSU_imgParams = '400px'; // The default parameters for inserted images
# global variables를 확인하고 없는 것은 추가해야 함.
$wgEnableWriteAPI = true; // Enable the API
$wgEnableUploads = true; // Enable uploads
$wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.)
$wgGroupPermissions['user']['upload'] = true; // Allow regular users to upload files
// Make sure that the file types you want to upload are allowed:
$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','pdf','ppt','tiff','bmp','docx','xlsx','pptx');
Configuration with PdfHandler
mw:Extensio:PdfHandler는 PDF 파일을 업로드하고 축소판 이미지 파일을 자동으로 생성합니다. MsUpload는 이미지를 페이지에 포함시킵니다. 그러나 MsUpload에서는 PDF를 이미지로 표시할 수 없습니다. MsUpload.js 파일에서 이 편집을 활성화하기 위해서는, 스위치를 검색하고 'pdf': 사례를 추가하십시오.