Topic on Project:Support desk

$wgUploadSizeWarning

2
PorzWiki (talkcontribs)

Hello,

in the LocalSettings I filled in:

$wgMaxUploadSize = [  '*' => 1024 * 1024, // 1000 KB

   'url' => 500 * 1024, // 500 KB ];

But how can I change the warning?

$wgUploadSizeWarning = 1000000;

for example is without any effect. If I test it with a oversized jpg the system says:

"Etwas ist schief gelaufen. Offset plus current chunk is greater than claimed file size"

How can I change this message into "Diese Datei ist zu groß. Maximal sind 1000 KB zulässig" ?

FreedomFighterSparrow (talkcontribs)

This looks like two system messages together: "ooui-dialog-process-error" says "Etwas ist schief gelaufen" (or "visualeditor-dialog-error" says "Etwas ist schief gelaufen …"), and then "apierror-invalid-chunk" adds "Offset plus current chunk is greater than claimed file size."

You can edit those message through their pages, e.g. "MediaWiki:apierror-invalid-chunk", but here's a couple of points:

  • You probably shouldn't change the first message, as it's a generic error message, followed by a more specific one, and might be used in a lot of other places.
  • "apierror-invalid-chunk" isn't the error message you're supposed to get if the file size is too big - that's either:
    • "file-too-large": "Die hochgeladene Datei war zu groß.", or "uploadstash-file-too-large" or
    • "uploadstash-file-not-found-not-exists": "Der Pfad konnte nicht gefunden werden oder die Datei ist nicht eindeutig."
    • "apierror-invalid-chunk" is supposed to show when the original file size claimed was X, but the current chunk uploaded (when the upload is in chunks) already exceeds that claimed file size. If it shows for files that are simply too big, that might be a bug...
Reply to "$wgUploadSizeWarning"