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

Uploading large files

From Wikitech-static
Revision as of 00:06, 17 May 2016 by imported>Dereckson (Now 5 GB max, per rOMWCa6e5f230)
Jump to navigation Jump to search

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

Per rOMWCa6e5f230 the maximum file size is 5 GB.

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 [1])

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

Tip and tricks

Google Drive

It's also possible to download a file from Google Drive, but you need to transform the URL and ask curl to follow redirects:

curl -L -O -x webproxy.eqiad.wmnet:8080 https://googledrive.com/host/0BxoqnOKDr5j5NWJHQ0RlM2VJcWM

You have to use https://googledrive.com/host/<the file ID> as URL.