We're Hiring!

file name/path on server

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

file name/path on server

Postby jennBakal » Thu Feb 10, 2011 7:03 am

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
jennBakal
 
Posts: 18
Joined: Fri Dec 10, 2010 4:45 am

Re: file name/path on server

Postby wmoore » Thu Feb 10, 2011 7:24 am

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
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: file name/path on server

Postby jmoore » Thu Feb 10, 2011 7:37 am

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.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest