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>Alex Monk
(add note about $https_proxy)
imported>Dereckson
No edit summary
Line 1: Line 1:
Per [https://phabricator.wikimedia.org/T106444] the maximum file size is 4GiB.
Per [https://phabricator.wikimedia.org/T106444] the maximum file size is 4GiB.
== 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
== Step 1: download files ==


Download the files to terbium (or if there's not enough space, tin) with http_proxy=webproxy.eqiad.wmnet:8080 (or https_proxy for https requests)
Download the files to terbium (or if there's not enough space, tin) with http_proxy=webproxy.eqiad.wmnet:8080 (or https_proxy for https requests)


(url-downloader.wikimedia.org:8080 has a limit just under 1GB - see [https://phabricator.wikimedia.org/T111941])
(url-downloader.wikimedia.org:8080 has a limit just under 1GB - see [https://phabricator.wikimedia.org/T111941])
<source lang="bash">
curl -O -x webproxy.eqiad.wmnet:8080 <URL>
</source>
At this stage, it could be pertinent to check the hash of the file if known.
== Step 2: import image to Commons ==


<source lang="bash">
<source lang="bash">
mwscript importImages.php --wiki=commonswiki --comment-ext=txt --user=USERNAME /tmp/uploads
mwscript importImages.php --wiki=commonswiki --comment-ext=txt --user=USERNAME /tmp/uploads
</source>
</source>

Revision as of 10:39, 1 April 2016

Per [1] the maximum file size is 4GiB.

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

Step 1: download files

Download the files to terbium (or if there's not enough space, tin) with http_proxy=webproxy.eqiad.wmnet:8080 (or https_proxy for https requests)

(url-downloader.wikimedia.org:8080 has a limit just under 1GB - see [2])

curl -O -x webproxy.eqiad.wmnet:8080 <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