On Mar 1, 2012, at 6:21 PM, Nicolas Vervelle wrote:
The problem is that, depending on MediaWiki configuration, uploaded files can 
end up in different directories (to avoid putting thousands of files in the 
same directory)...
And the user has absolutely no control over which directory will be used for a 
file.
So there's not really a possible default directory...
For example, on Jmol wiki, 1ALE.pdb is in images/e/e3 directory, while 
1HPNmod.pdb is in images/4/49
Nico

Nico,

The subdirectories under images/ are computed from the md5 of the file name.

  $name = "1ALE.pdb";

  $md5= md5(ucfirst($name));

  $fullPath = "images/" . substr($md5,0,1) . "/" . substr($md5,0,2) . "/" . 
ucfirst($name);

Jaim
--
Dr Jaime Prilusky
Head Bioinformatics
R&D Bioinformatics and Data Management
Department of Biological Services
Weizmann Institute of Science
76100 Rehovot - Israel

eml: jaime.prilu...@weizmann.ac.il<mailto:jaime.prilu...@weizmann.ac.il>
fax: 972-8-9344113
tel: 972-8-9344959

OCA, http://oca.weizmann.ac.il (the protein structure/function database)
Proteopedia, http://proteopedia.org (because life has more than 2D)


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to