You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Uploading large files: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Dzahn
(replace mwmaint1001 with mwmaint1002)
imported>Reedy
(→‎Step 1: download files: Proxy works automagically)
Line 9: Line 9:
== Step 1: download files ==
== Step 1: download files ==


Download the files to [[mwmaint1002]] (or if there's not enough space, deploy1001) with http_proxy=webproxy.eqiad.wmnet:8080 (or https_proxy for https requests)
Download the files to [[mwmaint1002]] (or if there's not enough space, deploy1001).
 
(url-downloader.wikimedia.org:8080 has a limit just under 1GB - see [https://phabricator.wikimedia.org/T111941])


<source lang="bash">
<source lang="bash">

Revision as of 20:13, 28 June 2019

Requirement

You need:

  • the URL of the media file to upload
  • a text file with the first revision content
  • the name of the user account for this first revision and upload

MediaWiki currently doesn't support files greater than 4 GB (as size is stored as a 32 bits unsigned integer) while our swift backend storage is limited to 5 Gb. See phab:T191804 and phab:T191802 for discussion to extend this limit respectively to 5 GB and beyond.

Step 1: download files

Download the files to mwmaint1002 (or if there's not enough space, deploy1001).

wget <URL>

At this stage, it could be pertinent to check the hash of the file if known.

Step 2: import image to Commons

mwscript importImages.php --wiki=commonswiki --comment-ext=txt --user=USERNAME /tmp/uploads