We're Hiring!

Making Image Public

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.

Making Image Public

Postby icaoberg » Fri May 04, 2012 6:29 pm

I am making an HTML page that calls webgateway. I want my images to be public so that the HTML page can display thumbnails. how do i make them publicly available?
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: Making Image Public

Postby jmoore » Mon May 07, 2012 8:32 am

In 4.3 and before, your options are to try the experimental webpublic or put the image in a share and activate the share for the viewing session. You can read more about webpublic under
For 4.4, this application has been moved out
as an example, since this functionality is now integrated into the mainline.

Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Making Image Public

Postby icaoberg » Mon May 07, 2012 4:05 pm

then let me ask another question: can i trigger the login page before accessing the html page? since my html page has calls to the webgateway thumbnail render, if i am not logged in, the html pages displays missing thumbnails. is there a way to go directly to login?

ivan
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: Making Image Public

Postby wmoore » Tue May 08, 2012 3:24 pm

Hi,

If you're using the 4.3 (or earlier) version of OMERO web, you can use the @isUserConnected decorator to handle connection or redirection to login screen if you don't have a connection.

E.g. see webtest "dataset" as an example

https://github.com/openmicroscopy/openm ... ews.py#L31

We've actually tidied up the way we do this now, adding "conn" directly to the arguments list.

Code: Select all
@isUserConnected
def dataset(request, datasetId, conn=None, **kwargs):
    ds = conn.getObject("Dataset", datasetId)   
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest