Page MenuHomePhabricator

Return status from streamFile
Closed, ResolvedPublic

Description

  1. MediaTransformOutput::streamFile() and FileRepo::streamFile() should not convert the Status object to boolean when returning success/failure
  2. callers to these functions (at least thumb.php, img_auth.php, SpecialUndelete#showFile, SpecialRevisiondelete#tryShowFile and SpecialUploadStash#outputLocalFile) should look at the return value and raise a proper error if the streaming failed.

(Split from T92545.)

Event Timeline

Tgr raised the priority of this task from to Low.
Tgr updated the task description. (Show Details)
Tgr subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mainframe98 subscribed.

MediaTransformOutput::streamFile() has been deprecated since 1.26, and streamFileWithStatus exists since 1.27 (?). FileRepo's streamFile has been removed in it's entirety.

Added MediaTransformOutput::streamFile() to T259108: Drop legacy hard-deprecated code from MediaWiki ahead of MediaWiki 1.36 release.