Hi,
can someone give me an idea, how I can determine a uploaded file's real path, when I only have the filename? I have written some code but there could also be a API call available.
Best regards, Johannes
On 24 February 2012 15:09, Johannes Weberhofer jweberhofer@weberhofer.at wrote:
can someone give me an idea, how I can determine a uploaded file's real path, when I only have the filename? I have written some code but there could also be a API call available.
You mean like https://commons.wikimedia.org/wiki/Special:FilePath/File:Example.jpg ?
-- [[cs:User:Mormegil | Petr Kadlec]]
On Fri, Feb 24, 2012 at 15:11, Petr Kadlec petr.kadlec@gmail.com wrote:
On 24 February 2012 15:09, Johannes Weberhofer jweberhofer@weberhofer.at wrote:
can someone give me an idea, how I can determine a uploaded file's real path, when I only have the filename? I have written some code but there could also be a API call available.
You mean like https://commons.wikimedia.org/wiki/Special:FilePath/File:Example.jpg ?
Better yet, use the imageinfo API call:
https://www.mediawiki.org/wiki/API:Properties#imageinfo_.2F_ii
E.g.:
https://en.wikipedia.org/w/api.php?action=query&titles=Image:Albert%20Ei...
hello I have made an utility which give you all absolute URL's for a give list / category of files on commons, in case you were interested in that, I could send you a source code, however it just download a wiki page for each file and parse the url from the source
On Fri, Feb 24, 2012 at 3:09 PM, Johannes Weberhofer < jweberhofer@weberhofer.at> wrote:
Hi,
can someone give me an idea, how I can determine a uploaded file's real path, when I only have the filename? I have written some code but there could also be a API call available.
Best regards, Johannes -- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
Sorry, my request was a bit unclear,
I want to find the file's path in the file system. I know the URL, like http://test.com/wiki/images/test.png , and I like to know, the path which could be /var/www/domains/test.com/wiki/images/test.png . Is there a way to determine this path, even when the image folder is outside the servers doc-root for example?
Johannes
Am 24.02.12 15:13, schrieb Petr Bena:
hello I have made an utility which give you all absolute URL's for a give list / category of files on commons, in case you were interested in that, I could send you a source code, however it just download a wiki page for each file and parse the url from the source
On Fri, Feb 24, 2012 at 3:09 PM, Johannes Weberhofer< jweberhofer@weberhofer.at> wrote:
Hi,
can someone give me an idea, how I can determine a uploaded file's real path, when I only have the filename? I have written some code but there could also be a API call available.
Best regards, Johannes -- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Yes, the path is in http://www.mediawiki.org/wiki/Manual:$wgUploadDirectory
On Fri, Feb 24, 2012 at 3:42 PM, Johannes Weberhofer < jweberhofer@weberhofer.at> wrote:
Sorry, my request was a bit unclear,
I want to find the file's path in the file system. I know the URL, like http://test.com/wiki/images/**test.pnghttp://test.com/wiki/images/test.png, and I like to know, the path which could be /var/www/domains/ test.com/**wiki/images/test.png http://test.com/wiki/images/test.png . Is there a way to determine this path, even when the image folder is outside the servers doc-root for example?
Johannes
Am 24.02.12 15:13, schrieb Petr Bena:
hello I have made an utility which give you all absolute URL's for a give list / category of files on commons, in case you were interested in that, I could send you a source code, however it just download a wiki page for each file and parse the url from the source
On Fri, Feb 24, 2012 at 3:09 PM, Johannes Weberhofer< jweberhofer@weberhofer.at> wrote:
Hi,
can someone give me an idea, how I can determine a uploaded file's real path, when I only have the filename? I have written some code but there could also be a API call available.
Best regards, Johannes -- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
______________________________****_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/****mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/**mailman/listinfo/wikitech-l <ht**tps://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
______________________________**_________________
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
-- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
That's the base path; related to the settings in $wgHashedUploadDirectory (and other settings?) the real path may differ. I'm looking for a functions, that does this calculationfor me...).
Johannes
Am 24.02.12 16:03, schrieb Petr Bena:
Yes, the path is in http://www.mediawiki.org/wiki/Manual:$wgUploadDirectory
On Fri, Feb 24, 2012 at 3:42 PM, Johannes Weberhofer< jweberhofer@weberhofer.at> wrote:
Sorry, my request was a bit unclear,
I want to find the file's path in the file system. I know the URL, like http://test.com/wiki/images/**test.pnghttp://test.com/wiki/images/test.png, and I like to know, the path which could be /var/www/domains/ test.com/**wiki/images/test.pnghttp://test.com/wiki/images/test.png . Is there a way to determine this path, even when the image folder is outside the servers doc-root for example?
Johannes
Am 24.02.12 15:13, schrieb Petr Bena:
hello I have made an utility which give you all absolute URL's for a give list / category of files on commons, in case you were interested in that, I could send you a source code, however it just download a wiki page for each file and parse the url from the source
On Fri, Feb 24, 2012 at 3:09 PM, Johannes Weberhofer< jweberhofer@weberhofer.at> wrote:
Hi,
can someone give me an idea, how I can determine a uploaded file's real path, when I only have the filename? I have written some code but there could also be a API call available.
Best regards, Johannes -- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
______________________________****_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/****mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/**mailman/listinfo/wikitech-l <ht**tps://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
______________________________**_________________
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
-- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
$image = Image::newFromName($backImage); if(is_object($image)): if($image->exists()==1): $backImage = $image->getUrl();
-----Ursprüngliche Nachricht----- Von: wikitech-l-bounces@lists.wikimedia.org [mailto:wikitech-l-bounces@lists.wikimedia.org] Im Auftrag von Johannes Weberhofer Gesendet: Freitag, 24. Februar 2012 16:29 An: wikitech-l@lists.wikimedia.org Betreff: Re: [Wikitech-l] How to get a uploaded files path
That's the base path; related to the settings in $wgHashedUploadDirectory (and other settings?) the real path may differ. I'm looking for a functions, that does this calculationfor me...).
Johannes
Am 24.02.12 16:03, schrieb Petr Bena:
Yes, the path is in http://www.mediawiki.org/wiki/Manual:$wgUploadDirectory
On Fri, Feb 24, 2012 at 3:42 PM, Johannes Weberhofer< jweberhofer@weberhofer.at> wrote:
Sorry, my request was a bit unclear,
I want to find the file's path in the file system. I know the URL, like
http://test.com/wiki/images/**test.pnghttp://test.com/wiki/images/test.png , and I like to know, the path which could be /var/www/domains/ test.com/**wiki/images/test.pnghttp://test.com/wiki/images/test.png .
Is there a way to determine this path, even when the image folder is outside the servers doc-root for example?
Johannes
Am 24.02.12 15:13, schrieb Petr Bena:
hello I have made an utility which give you all absolute URL's for a give list / category of files on commons, in case you were interested in that, I could send you a source code, however it just download a wiki page for each file and parse the url from the source
On Fri, Feb 24, 2012 at 3:09 PM, Johannes Weberhofer< jweberhofer@weberhofer.at> wrote:
Hi,
can someone give me an idea, how I can determine a uploaded file's real path, when I only have the filename? I have written some code but there could also be a API call available.
Best regards, Johannes -- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
______________________________****_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/****mailman/listinfo/wikitech-lhttps:/ /lists.wikimedia.org/**mailman/listinfo/wikitech-l <ht**tps://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps: //lists.wikimedia.org/mailman/listinfo/wikitech-l
______________________________**_________________
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://li sts.wikimedia.org/mailman/listinfo/wikitech-l
-- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lis ts.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
-- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Fri, Feb 24, 2012 at 10:40 AM, Lists lists@psycholutions.com wrote:
$image = Image::newFromName($backImage); if(is_object($image)): if($image->exists()==1): $backImage = $image->getUrl();
The Image class has been deprecated and removed for quite some time now. You'll want to use wfFile().
-Chad
Thanks for your information. I'll give it a try next week.
Johannes
Am 24.02.12 16:51, schrieb Chad:
On Fri, Feb 24, 2012 at 10:40 AM, Listslists@psycholutions.com wrote:
$image = Image::newFromName($backImage); if(is_object($image)): if($image->exists()==1): $backImage = $image->getUrl();
The Image class has been deprecated and removed for quite some time now. You'll want to use wfFile().
-Chad
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Some time last year Zak Greant added call and caller graphs to our MediaWiki Class doc pages (e.g. http://svn.wikimedia.org/doc/classUser.html). While these are nifty to look at, and might even occasionally be useful, they make the pages take ages to load and frequently turn my browser into molasses (or lock it up completely). According to my highly scientific cost-benefit analysis, I think we should get rid of them. Yays? Nays?
Ryan Kaldari
yay -- It's especially annoying when you scroll down the page, and some of them load in late pushing your content down.
I believe this was brought up before to be able to toggle them. - Hunter F.
On Fri, Feb 24, 2012 at 4:59 PM, Ryan Kaldari rkaldari@wikimedia.orgwrote:
Some time last year Zak Greant added call and caller graphs to our MediaWiki Class doc pages (e.g. http://svn.wikimedia.org/doc/** classUser.html http://svn.wikimedia.org/doc/classUser.html). While these are nifty to look at, and might even occasionally be useful, they make the pages take ages to load and frequently turn my browser into molasses (or lock it up completely). According to my highly scientific cost-benefit analysis, I think we should get rid of them. Yays? Nays?
Ryan Kaldari
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
update: http://wikimedia.7.n6.nabble.com/Call-Graphs-in-MediaWiki-Documentation-td13...
- Hunter F.
On Fri, Feb 24, 2012 at 8:11 PM, Hunter Fernandes h.g.fern@gmail.comwrote:
yay -- It's especially annoying when you scroll down the page, and some of them load in late pushing your content down.
I believe this was brought up before to be able to toggle them.
- Hunter F.
On Fri, Feb 24, 2012 at 4:59 PM, Ryan Kaldari rkaldari@wikimedia.orgwrote:
Some time last year Zak Greant added call and caller graphs to our MediaWiki Class doc pages (e.g. http://svn.wikimedia.org/doc/** classUser.html http://svn.wikimedia.org/doc/classUser.html). While these are nifty to look at, and might even occasionally be useful, they make the pages take ages to load and frequently turn my browser into molasses (or lock it up completely). According to my highly scientific cost-benefit analysis, I think we should get rid of them. Yays? Nays?
Ryan Kaldari
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org