On 07/06/12 17:07, nguyenkim thuat wrote:
When I tried to call this function for example with filename *'20120606205541!Test.txt'* which is located in directory images/archive/ I got empty result. According to the documentation of the download function, it means the file doesn't exist on the MediaWiki. */"If the file does not exist (on the wiki) an empty string is returned. If the file is unable to be downloaded undef is returned./*"
the "name" is the name in the wiki - ie File:Something.jpg - not the on disk name. the download call was a shortcut to get the last version only.
Read the API documentation here - http://www.mediawiki.org/wiki/APIin this case you can use imageinfo.
http://en.wikipedia.org/w/api.php?action=query&titles=Image:Albert%20Ein...
Best Regards
Jools