       const source = document.getElementById("sources").value;

            var query = '?state=%7B';
            if (file_ids.length) {
                query += '%22ids%22:%5B';
                const files = file_ids.split(',');
                for (var i=0; i<files.length; i++) {
                    if (i) query += ',';
                    query += '%22' + encodeURIComponent(files[i]) + '%22';
                }
                query += '%5D';
                if (file_urls.length) query += ',';
          