Topic on Project:Support desk

I successfully uploaded files with 'hwp' and 'hwpx' extensions on MediaWiki, but they're not downloadable. What should I do?

5
Shb06202 (talkcontribs)

You've successfully uploaded files with 'hwp' and 'hwpx' extensions on MediaWiki, but they're not downloadable. What should you do?

Shb06202 (talkcontribs)

In the LocalSettings.php file, I added the following lines:

# File upload $wgStrictFileExtensions = false; $wgCheckFileExtensions = false; $wgVerifyMimeType = false; $wgFileExtensions[] = 'hwpx'; $wgFileExtensions[] = 'zip'; $wgProhibitedFileExtensions = array_diff($wgProhibitedFileExtensions, ['hwpx']); // $wgTrustedMediaFormats[] = 'ARCHIVE'; $wgTrustedMediaFormats[] = 'application/zip';


Despite adding these lines, only uploads are possible, and downloads are not working.

Ciencia Al Poder (talkcontribs)

What error do you get when downloading them?

Shb06202 (talkcontribs)

When attempting to download, instead of a download popup, a broken screen is displayed, and the download is not initiated.

Ciencia Al Poder (talkcontribs)

Unless you're using an extension that stores files in AWS, Swift or other custom location, files are stored directly on disk. And if you haven't configured MediaWiki to serve files through img_auth.php, clicking on any file would point to an URL that directly maps a file on the server. This means MediaWiki doesn't do anything to serve the file to you, it's your webserver's matter.

Maybe you must configure your webserver to download those files, if for some reason it refuses to serve a file with an unknown extension. Or maybe an intermediate proxy, a firewall or antivirus is blocking the file from being downloaded. Or even your browser may be blocking it.

You'll have to check the URL of the file it tries to download, ensure the file exists on the web server, and check webserver logs for any error or warning. Then try different servers or tools to download that URL.

Reply to "I successfully uploaded files with 'hwp' and 'hwpx' extensions on MediaWiki, but they're not downloadable. What should I do?"