Page MenuHomePhabricator

The UploadVerifyFile hook should say whether the upload is going to be immediately published, so consumers of UploadVerifyUpload hook can skip duplicate checks
Closed, ResolvedPublic

Description

The UploadVerifyFile hook should say whether the upload is going to be immediately published, so consumers of UploadVerifyUpload hook can skip duplicate checks.

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptJul 15 2016, 10:51 PM
Restricted Application added subscribers: Zppix, Steinsplitter, Aklapper. · View Herald Transcript

@aaron Is there any non-sucky way to do this? (Other than changing every place where we call UploadBase::verifyFile() and UploadBase::performUpload(), and passing a boolean parameter like "$forImmediateUpload" to verifyFile().)

Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 15 2016, 10:55 PM
matmarex claimed this task.Jul 18 2016, 8:12 PM
matmarex triaged this task as High priority.

Change 300842 abandoned by Bartosz Dziewoński:
Pass $forImmediatePublishing to UploadVerifyFile hook

Reason:
This seems to be a lot more confusing than I thought it would be. Let's not do it. I'm working on a different approach.

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

Change 302721 had a related patch set uploaded (by Bartosz Dziewoński):
Introduce UploadStashFile hook, improve API handling of stash errors

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

Change 302721 merged by jenkins-bot:
Introduce UploadStashFile hook, improve API handling of stash errors

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

matmarex closed this task as Resolved.Aug 11 2016, 7:12 PM
matmarex removed a project: Patch-For-Review.

I guess the way we ended up doing this doesn't match the task title very well… Consumers of UploadVerifyUpload wishing to skip duplicate checks should use UploadStashFile rather than UploadVerifyFile now.