[openstreetmap/openstreetmap-website] Allow `user/preferences` values up to 10_000 (PR #6399)
Martin Raifer
notifications at github.com
Wed Jan 7 19:13:12 UTC 2026
tyrasd left a comment (openstreetmap/openstreetmap-website#6399)
I was just about to post the potential use cases from an OSM editor application (custom background imagery URLs, custom presets data in JSON format, etc.), but it seems @tordans was faster. :sweat_smile:
Not having looked at @tordans's [editor-settings-schema](https://github.com/tordans/editor-settings-schema) in detail yet, my initial idea was also to implement this using the _preferences_ API: e.g. by storing the number of to be saved custom background layer entries as the value of one, and then one additional entry per to be stored URL. For presets this would be similar, except that the payload would be a JSON representation of the preset instead.
Would introducing a new API for this really be a big benefit? I see the downside of having to implement and maintain of additional endpoints. And there we would again have the same question of how much data one would allow a user to store in that extra API, wouldn't we?
PS: here are some numbers for reference for some of the mentioned use cases:
* currently, an median length of a URL of an imagery entry in ELI is 170 characters, but 59 entries are longer than 255 characters
* the average file size of a preset in the id-tagging-schema is 433 bytes. that might be compressible a bit by stripping unnecessary whitespace, but it would still be often over the 255 bytes limit, I assume
* for how overpass-turbo currently stores queries (which admittedly is kind of questionable of whether its use of the _preferences_ API is intended or not), the average size of a stored query should be in the ballpark of around 550 characters (based on the average size of queries shared publicly through overpass-turbo.eu's short URL service)
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6399#issuecomment-3720373596
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6399/c3720373596 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260107/b465d015/attachment-0001.htm>
More information about the rails-dev
mailing list