Commons:Mida màxima d'un fitxer

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
This page is a translated version of a page Commons:Maximum file size and the translation is 9% complete. Changes to the translation template, respectively the source language can be submitted through Commons:Maximum file size and have to be approved by a translation administrator.
Outdated translations are marked like this.
Shortcuts

La mida màxima d'un fitxer a Commons és de GiB (5.368.709.120 bytes[1]). Les càrregues amb l'Auxiliar de càrrega, o amb altres eines que admetin càrregues fragmentades i les càrregues del servidor han de ser inferiors a aquest límit.[2][3] En cas contrari, el límit és de 100 MiB (104.857.600 bytes)[4] a causa de problemes tècnics en la càrrega.[5][6]

Això vol dir que no és possible carregar un fitxer superior a la mida màxima sense abans dividir-lo en parts més petites i carregar-les com a fitxers separats. La plantilla {{Split file}} es pot utilitzar per enllaçar les parts dels fitxers dividits d'aquesta manera.

Please note that every effort should be made to keep files under the file size limit without splitting them. There are various means to do this, including changing file formats, removing parts of a file not really needed, and downsampling resolution, increasing compression levels, etc. Only where these measures aren't enough (because further loss of detail would reduce quality too much) should files be split.

In particular, TIFF images are often very large, but can have their file size reduced by enabling compression. As long as the compression method is lossless (such as “deflate” or “LZW”), the file size reduction does not affect image quality (but beware of obscure compression methods which can cause data loss, or make the file incompatible with some software).

On the other hand, there is no limit to the total size of uploads by an individual account. However, if you plan batch uploads amounting to several TB, it may be wise to warn the sysadmins.

Note: Large SVG files (> 5 MiB) need to have the translations appear closer to the beginning of the file.

Maximum upload size

While hosting files up to 5 GiB is supported, the maximum file size for uploading is 100MB. The UploadWizard and several community-supported tools can use chunked uploading to upload such files in smaller (<100MB) pieces that are reassembled on the server.

In general you should be able to upload files close to the 5 GiB limit using chunked uploads without any issues. In the past bugs broke most large uploads, but as of October 29, 2021, these have been fixed now.[7]. Large uploads using the upload-by-url functionality may still timeout (especially those from archive.org[8]). In these cases you are recommended to download the file locally and then re-upload it using chunked uploads.

If you are still unable to upload the file (receiving 503/504 or "stash failed" type errors), request a server-side upload.

Maximum size for thumbnails

Since December, 17th, 2021 the servers have no size limit for generating thumbnails. Instead, a timeout of 59 seconds for generating thumbnails was configured by using the new Thumbor service.[9]

However, for large GIF animations the limit is currently 100 megapixels. For files where the software does not provide thumbnails because of this limitation, a thumbnail version (either a full-sized JPEG or a smaller PNG) should be uploaded for thumbnail/preview purposes, and linked with the main file. The templates {{Archival version}} and {{Compressed version}} are available for this.

An unrelated reason thumbnails may fail to display (example) is for very long filenames – so long that they approach the 255-byte limit of filename length (which for some cases with non-ASCII characters may be much less than 255 characters, due to UTF-8). It is impossible to upload a file that has a name this large, but it is possible to move a file to such a name.[10]

Technical notes

  1. gerrit:280831, gerrit:1002813
  2. Originally 500 MiB, increased to 1,000 MiB in November 2013, increased to 2,047 MiB in Feb 2016, increased to 4 GiB in April 2016, increased to 5 GiB in Feb 2024
  3. This is a hard limit because of how MediaWiki stores file sizes.phab:T191805
  4. It has been 20 MB for a while and was raised to 100 in November 2008.

    [1]
  5. Village pump (2011-11)
  6. Wikitech-l: Upload file size limit (2010-07)
  7. wikitech:Incident documentation/2021-11-04 large file upload timeouts
  8. T295009: Improve download speed from archive.org on appservers
  9. configuration change, Phab:T291014#7367570: 59 seconds timeout
  10. phab:T32202

Help