Page MenuHomePhabricator

file path for paged media
Closed, DeclinedPublic

Description

Author: enomil

Description:
Currently there is no support for getting the file path of a paged media like pdf and djvu.

{{filepath:FFC2.djvu|page=3}}
actual value: upload.wikimedia.org/wikipedia/commons/b/b0/FFC2.djvu
expected value:
upload.wikimedia.org/wikipedia/commons/thumb/b/b0/FFC2.djvu/page3-1020px-FFC2.djvu.jpg

{{filepath:FFC2.djvu|page=3|800}}
actual value: upload.wikimedia.org/wikipedia/commons/thumb/b/b0/FFC2.djvu/page1-800px-FFC2.djvu.jpg
expected value:
upload.wikimedia.org/wikipedia/commons/thumb/b/b0/FFC2.djvu/page3-800px-FFC2.djvu.jpg

Same for Special:FilePath.


Version: unspecified
Severity: enhancement
Whiteboard: aklapper-moreinfo

Details

Reference
bz35380

Related Objects

StatusSubtypeAssignedTask
InvalidNone
DeclinedNone

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 12:20 AM
bzimport set Reference to bz35380.
bzimport added a subscriber: Unknown Object (MLST).

beau wrote:

What is the use for this function?

enomil wrote:

It is the normal use as for non paged media: to get the file path of an image. But for single pages it is harder to find: each page of an djvu/pdf can have another resolution and to get the full image of an page you need the width for it, because it is used in the link itself.

enomil: Why would you want to get the file path of an image?

(In reply to comment #3)

enomil: Why would you want to get the file path of an image?

There's a completeness issue here as well. {{filepath}} exists and accepts parameters, hence it should work for all types of media. In particular page number parameter is part of core, but even beyond that for completeness sake it should work with all possible parameters (like tiff files can specify lossy vs lossless thumbnail). Obviously that's a bit of an ideal world thing, allowing arbitrary image parameters is not a very high priority thing, and might be rather complicated. But it would be nice.

For interest, original reason for adding a width parameter was "Requested by Krinkle for his Wordpress plugin (PhotoCommons)" (According to the commit summary of r80381)

/me would kind of be curious to see how {{filepath}} is actually used in practice as it seems to be one of the more useless magic words...

enomil: Could you answer comment 3 and 4, please?

enomil: Could you answer comment 3 and 4, please?

Unfortunately closing this report as no further information has been provided.

enomil: Please feel free to reopen this report if you can provide the information asked for in comment 3 and comment 4, and if this still happens. Thanks!

Gilles raised the priority of this task from Lowest to Unbreak Now!.Dec 4 2014, 10:12 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Lowest.Dec 4 2014, 11:20 AM