Page MenuHomePhabricator

UploadStash does not support showing thumbnails of paged media (like pdf's), or other weird filetypes like ogg.
Closed, ResolvedPublic

Description

Upload stash seems to fail for paged media (pdf's is what i tested. But same issue presumably applies to other paged formats like Djvu, and other "weird" formats like ogg most likely).

This seems to be because SpecialUploadStash only accounts for width parameters to be at the begining of the thumbnail name. It doesn't look for a page parameter. Handler's can define there own parameter, so this would also break for things like oggHandler, which can have a seek parameter for where in the video the image was pulled from.

As a secondary issue, UploadStash doesn't support files with multiple extensions (key is not in proper format...), which happens for pdf's (And some other non-image formats) since the thumbnail is jpg, but the original is pdf. so the filename of a thumb ends up being page1-100px-foo.pdf.jpg


Version: 1.18.x
Severity: minor

Details

Reference
bz27038

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:18 PM
bzimport set Reference to bz27038.
bzimport added a subscriber: Unknown Object (MLST).

Just to clarify, this is for showing thumbnails. Downloading the original files is just fine. I'm not really sure how showing thumbnails from upload stash is used, so i'm not sure how big an issue this is. But you can make a query using stashimageinfo api module, get a url for a thumbnail, but then have the url totally not work.

Bryan.TongMinh wrote:

UploadStash should use the proper MediaHandler::*Params() functions instead of doing the regex themselves.
It should also use different base urls for thumbnails and files; I propose Special:UploadStash/file/ and Special:Upload/thumb/

Bryan.TongMinh wrote:

Fixed in r81209.