Skip to content

Post data save imgRdef#683

Open
will-moore wants to merge 2 commits into
ome:masterfrom
will-moore:post_data_saveImgRDef
Open

Post data save imgRdef#683
will-moore wants to merge 2 commits into
ome:masterfrom
will-moore:post_data_saveImgRDef

Conversation

@will-moore

@will-moore will-moore commented Jul 1, 2026

Copy link
Copy Markdown
Member

This is part of a fix for ome/omero-iviewer#545

To avoid issues with long URL request parameters when saving rendering settings, we use the POST data (instead of the URL).
The saveImgRdef endpoint will now accept both forms.
The Preview "webgateway" viewer uses the POST data to handle the params. This doesn't need any change in construction of the query string or the parsing of the parameters in Django.

To test:

@will-moore will-moore changed the title Post data save img r def Post data save imgRdef Jul 1, 2026
@sbesson

sbesson commented Jul 1, 2026

Copy link
Copy Markdown
Member

Wasn't the ability to use POST requests for saving rendering settings already introduced in #606?

@will-moore

Copy link
Copy Markdown
Member Author

@sbesson Ah, hmmm - #606 solves the long query string problem for rendering images by removing inactive channels. But it doesn't change the URL length for saving rendering settings.

We can update the viewport.getQuery(true) in this PR to viewport.getQuery(true, undefined, undefined, false) to NOT include inactive channels in the query when Saving. However, that has a slight change in behaviour.
Currently, if you go through a bunch of channels making rendering settings changes (e.g. colour, min/max etc) but then you only have 1 channel active when you Save, you will only save changes to 1 channel.

However, this PR would allow you to save inactive channels.

@sbesson

sbesson commented Jul 2, 2026

Copy link
Copy Markdown
Member

@sbesson Ah, hmmm - #606 solves the long query string problem for rendering images by removing inactive channels. But it doesn't change the URL length for saving rendering settings.

#606 reduced the length on the query string for rendering requests but it also enabled some POST requests. Reading more carefully at the changes, the scope was limited the /webgateway/copyImgRDef endpoint and fixing the copy of rendering settings when working with images including a large number of channels.

@will-moore

Copy link
Copy Markdown
Member Author

@sbesson Agreed. But no changes on #606 were made to the saving behaviour / or url length.

To enable saving of rendering settings for images with many channels, either we:

The 2nd option gives a nicer experience for users because it will save any changes they've made to inactive channels (which is the current behaviour).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants