searchXHR = null
function search() {
    abortPreviousSearch()

    m.request({
        method: &quot;GET&quot;,
        url: &quot;/api/v1/users&quot;,
        params: {search: query},
        config: function(xhr) {searchXHR = xhr}
    })
}
function abortPreviousSearch() {
    if (searchXHR !== null) searchXHR.abort()
    searchXHR = null
}</code></pre>
<hr>
<h3 id=file-uploads><a href=#file-uploads>File uploads</a></h3>
<p>To upload files, first you need to get a reference to a <a href=https://developer.