Page MenuHomePhabricator

Kill 'emptyfile' error code in favor of 'empty-file'
Closed, ResolvedPublic

Description

Handle 'emptyfile' error, and in particular, investigate why this is different from 'empty-file' that we already handle.

Event Timeline

matmarex created this task.Mar 20 2016, 7:31 AM
Restricted Application added a project: Multimedia. · View Herald TranscriptMar 20 2016, 7:31 AM
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript
matmarex triaged this task as Normal priority.Mar 24 2016, 8:36 AM
matmarex edited projects, added MediaWiki-API, MediaWiki-Uploading; removed UploadWizard.

I think this warning code is a bug and everything should consistently use 'empty-file' instead. The only way to make 'emptyfile' happen is to somehow get a zero-length file into upload stash (which is impossible, as both frontends [special page and API module] and the upload backend actively reject zero-length files), so this is realistically not going to be a breaking change, but technically it does change the API output. A legit 'empty-file' is returned from the API as an error (not a warning) when trying to upload an empty file, and potentially also as a warning but I couldn't find a way to trigger this.

Restricted Application added a subscriber: Matanya. · View Herald TranscriptMar 24 2016, 8:36 AM
matmarex renamed this task from Handle 'emptyfile' error to Kill 'emptyfile' error code in favor of 'empty-file'.Mar 24 2016, 8:37 AM

Change 279310 had a related patch set uploaded (by Bartosz Dziewoński):
UploadBase: Replace 'emptyfile' warning code by 'empty-file'

https://gerrit.wikimedia.org/r/279310

Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.Mar 24 2016, 1:20 PM

Change 279310 merged by jenkins-bot:
UploadBase: Replace 'emptyfile' warning code by 'empty-file'

https://gerrit.wikimedia.org/r/279310

matmarex closed this task as Resolved.Apr 1 2016, 2:40 PM
matmarex removed a project: Patch-For-Review.