Commit 83140be 1 parent 228b813 commit 83140be Copy full SHA for 83140be
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 559
559
async function dumpAnnotations ( id , name , format ) {
560
560
const { backendAPI } = config ;
561
561
const filename = name . replace ( / \/ / g, '_' ) ;
562
- let url = `${ backendAPI } /tasks/${ id } /annotations/${ filename } ?format=${ format } ` ;
562
+ const baseURL = `${ backendAPI } /tasks/${ id } /annotations/${ encodeURIComponent ( filename ) } ` ;
563
+ let query = `format=${ encodeURIComponent ( format ) } ` ;
564
+ let url = `${ baseURL } ?${ query } ` ;
563
565
564
566
return new Promise ( ( resolve , reject ) => {
565
567
async function request ( ) {
569
571
if ( response . status === 202 ) {
570
572
setTimeout ( request , 3000 ) ;
571
573
} else {
572
- url = `${ url } &action=download` ;
574
+ query = `${ query } &action=download` ;
575
+ url = `${ baseURL } ?${ query } ` ;
573
576
resolve ( url ) ;
574
577
}
575
578
} ) . catch ( ( errorData ) => {
You can’t perform that action at this time.
0 commit comments