<p></p>
<h3 dir="auto">Description</h3>
<p dir="auto">As <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="282551032" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/1702" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/1702/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/1702">#1702</a> outlined (with a totally problem), the maximum length for the <code class="notranslate">description</code> value of a GPX track is 255 characters as per API restriction.</p>
<p dir="auto">But, similar to StreetComplete (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1299777857" data-permission-text="Title is private" data-url="https://github.com/streetcomplete/StreetComplete/issues/4195" data-hovercard-type="issue" data-hovercard-url="/streetcomplete/StreetComplete/issues/4195/hovercard" href="https://github.com/streetcomplete/StreetComplete/issues/4195">streetcomplete/StreetComplete#4195</a>), the website does not restrict the maximum length of the input box. As the error message "is too long (maximum is 255 characters)" is only show after the user submits the form, the GPX file has already been completely transferred by the browser, only to be discarded because the API restrictions were violated.</p>
<p dir="auto">Possible solution: Either use the slightly dated <code class="notranslate">maxlength</code> attribute on the <code class="notranslate">input</code> box or make a javascript check to not allow the form to be submitted if the description exceeds the maximum allowed characters.</p>
<p dir="auto">If using a fixed value of 255 feels to static, adding that value in the GET /api/capabilities and using that as a reference for the input fields, should the datamodel ever be expanded (this could also be used for limits on the texts of Note Comments, if they exist).</p>
<p dir="auto">Thoughts?</p>
<p dir="auto">K</p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><em>No response</em></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/3594">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNXT7WZEZBUDAFA43TVTKX7LANCNFSM53E37UKA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLIE35LFOIJQSNBMDVDVTKX7LA5CNFSM53E37UKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4TL23MOQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/3594</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/3594",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3594",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>