Dual strategy thumbnailing -- locally for development and simpler wikis, or in the...
authorNeil Kandalgaonkar <neilk@users.mediawiki.org>
Tue, 30 Nov 2010 02:45:10 +0000 (02:45 +0000)
committerNeil Kandalgaonkar <neilk@users.mediawiki.org>
Tue, 30 Nov 2010 02:45:10 +0000 (02:45 +0000)
commite4e03d1ba46518773c892287db9f82577c6ea7ec
tree041601b185e660785cc0cfae901e8a4ebf1b37a2
parent18495ef0e591896d56b904aa4ed999aa0eface56
Dual strategy thumbnailing -- locally for development and simpler wikis, or in the cluster for setups like the WMF's

When we did our test deploy, we found that we could not scale thumbnails locally in the cluster (and this was undesirable anyway).
So, we moved UploadStash thumbnailing to occur on URL invocation, which is more like the usual MediaWiki model anyway. So the customized transform()
moved from UploadStash to just being a special case of how SpecialUploadStash does things.

Note that the Special:UploadStash url masks how the thumbnail is obtained. Unlike the regular Commons wiki, the user never sees the cluster's URL for the thumbnail.
A web request, or an imageMagick call, is performed right there and then, and the results are catted out to the client.

For consistency, we did not use wfStreamfile since we were in some cases streaming from contents obtained over the MWhttpRequest, not just local files.
includes/specials/SpecialUploadStash.php
includes/upload/UploadStash.php