Topic on Extension talk:MultimediaViewer

Link to an image in subdirectory

1
Ievgen D (talkcontribs)

How are file links passed to MultimediaViewer?

I'm going to use private wiki as photo library. Pictures can be taken from different cameras, so file names across the whole library may be not unique. Storing them in different directories is the only acceptable solution. Renaming is not considered due to amount of files. Also my pictures and pictures shared with me by others should be in different directories. So my decision is to copy files to images/Photo/XXXX/ subdirectory, where XXXX is a sequence number, then to run modified maintenance/importImages.php script to create corresponding DB records. Also I had to modify some scripts to replace '/' with '%2F' for correct processing in links. Now everything works fine except MultimediaViewer. The latter also works fine from a file page via 'Open in MultimediaViewer' button, but not from a standard article page. Button on a file page generates link e.g. wiki/index.php/File:Photo/00003/DSC_3201.JPG#/media/File:Photo%2F00003%2FDSC_3201.JPG, which is correct. When I click on thumbnail on article page the link generated gets wrong: wiki/index.php/Photo/00003/3201#/media/File:DSC_3201.JPG, missing 'Photo%2F00003%2F' part of subfolder and causing file not found (404) error.

I can't find out how this link is generated. I tried to review source code of both page types but with no result. I can't see neither 'Open in MultimediaViewer' button in the source of a file page nor incorrect links or '#/media' keyword in the source of an article page. Also I tried to search '#/media' substring in contents of all files in wiki/ subdirectories, found 3 files but without explicit correlation with the url passed (or generated).

Could you please help?

Reply to "Link to an image in subdirectory"