Page 1 of 1

file name/path on server

PostPosted: Thu Feb 10, 2011 7:03 am
by jennBakal
hi,

if i create a jpg and attach it as a file annotation to an image, is it possible to get the path/name of the file on the server (for use in html)?

thanks,
jenn

Re: file name/path on server

PostPosted: Thu Feb 10, 2011 7:24 am
by wmoore
It is possible but I'm not sure it's a good idea. The file will have an ID (in the OriginalFiles database table) and the file will be placed in the binary repository, usually /OMERO in a path like /OMERO/Files/123 or for higher IDs /OMERO/Files/Dir-003/3256. Notice that the file itself will not be named .jpg. It it simply data on disk that is only designed for the OMERO server to access it, not directly read from elsewhere (e.g. html).

The proper way for OMERO to display a web page with an attached file as jpg is the OmeroWeb framework.
https://trac.openmicroscopy.org.uk/omero/wiki/OmeroWeb

Can you explain what it is you want to achieve?

Will

Re: file name/path on server

PostPosted: Thu Feb 10, 2011 7:37 am
by jmoore
Hi Jenn,

for use in what kind of HTML? From OMERO.web? Or your own web server locally, which happens to be on the same machine as OMERO? If so, officially, no, the files are stored to a random location like: /OMERO/Files/Dir-001/123 which isn't provided through the API. However, the logic to get from originalFile.id.val to the path is pretty obvious, but it will be a custom solution.

~J.