Help:Chunked upload
This page transcludes Commons:Chunked uploads and User talk:Rillke/bigChunkedUpload.js until the latter is integrated into the former.
Chunked uploads with Upload Wizard
Upload Wizard uses chunked uploads to provide better reliability during the upload of large files. In addition, it allows a greater maximum file size (4 GB as opposed to the usual 100 MB).
During a chunked upload, the file is split into small parts and these parts are uploaded. If some parts failed to upload, the whole file does not have to be re-uploaded, only the parts that failed. All this is done in the background in UploadWizard.
It provides better reliability not just for UploadWizard, but also for bots using the API, especially for files uploaded through the API.
See also
Chunked upload fails (2012) |
Stashed upload manual draft |
Chunked upload tracking bug |
Uploadstash errors tracking |
- MediaWiki documentation about chunked upload
- Help:Server-side upload
- Special:UploadStash, which sometimes allows completing a chunked upload when the UploadWizard fails.
Chunked uploads with script bigChunkedUpload
Gist: Helps you to get done with individual, huge uploads.
This script is intended to be used by power users who want to overwrite or upload new files over a slow connection, in relation to the file size. It assumes its users know or can imagine what a chunk, a byte, the upload stash and an offset are and how to write wiki markup. Hint: The latter is what you enter if you prefer not to use the VisualEditor. At Wikimedia Commons, the most important template is {{Information}}, which you certainly want to use on every of your file description pages.
If you don't know, you can still try your luck but don't blame me for any unexpected incidents.
How to install
Add
importScript('User:Rillke/bigChunkedUpload.js');
to your common.js.
Global or foreign wiki installation
Note that the uploads always go to the wiki you are on! Cross-Wiki upload is not supported yet.
Add
mw.loader.load( 'https://commons.wikimedia.org/w/index.php?title=User:Rillke/bigChunkedUpload.js&action=raw&ctype=text/javascript' );
to your global.js.
Make sure you remove any imports of this script at Wikimedia Commons before enabling global import, i.e. check your common.js and vector.js (or monobook.js respectively) that you do not import the script there.
How to use
Overwriting an existing file
- Choose the second option of the upload link of any file page:
- Upload a new version of this file (chunked upload)
- Fill out the reason field in the pop up and select the file to upload.
Creating a new file
- Navigate to File:DesiredFileName.ext. Please amend the file name before selecting a file to be useful.
- Press upload (chunked) from your "Tools" box in the sidebar, or from the drop-down menu next to the create (or edit) tab. The location of the link depends on your system and settings.
- Fill out the file description field in the pop up and then select the file to upload.
Compatibility
For a rough estimation c.f. http://caniuse.com/xhr2
Troubleshooting
- In case the last chunk was uploaded and you see an error, please go to your UploadStash and try publishing from there (click here).
- If publishing doesn't work, you might be running across this error. To workaround it, follow the instructions here.
- Always select a reasonable chunk size. Uploading a 500 MiB video in 100 KiB chunks will likely fail due to server quotas while assembling the chunk. Uploading a 100 MiB video through a crappy connection with a chunk size of 20 MiB will likely be unsuccessful, too because none of the chunks will make it in one piece to the server.
- There is currently a known issue with larger DJVUs and PDFs. To successfully upload them, you have to un-tick the checkbox use stash and async (recommended for large videos and photos). Don't do this generally as it makes the upload process more unreliable.
- If larger chunks are told be uploaded 100% within no time and you encounter errors, it is most likely a proxy is taking all the data from your browser. Check your browser's and system's proxy settings then.
- Report any other issues to my talk page.
See also
- Users using bigChunkedUpload.js (including CSteipp, Software Security Engineer, Wikimedia Foundation)
- Uploads since 2 November 2022