File tree 1 file changed +9
-5
lines changed
src/main/resources/static/JS
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,15 @@ function map() {
32
32
http . responseType = 'blob' ;
33
33
34
34
http . onload = ( ) => {
35
- let content_dispo = http . getResponseHeader ( "content-disposition" ) ;
36
- let filename = content_dispo . substr ( content_dispo . lastIndexOf ( "=" ) + 1 ) ;
37
- let content_type = http . getResponseHeader ( "content-type" ) ;
38
- console . log ( "Downloading result to " + filename + " with content type " + content_type ) ;
39
- download ( http . response , filename , content_type ) ;
35
+ if ( http . status === 200 ) {
36
+ let content_dispo = http . getResponseHeader ( "content-disposition" ) ;
37
+ let filename = content_dispo . substr ( content_dispo . lastIndexOf ( "=" ) + 1 ) ;
38
+ let content_type = http . getResponseHeader ( "content-type" ) ;
39
+ console . log ( "Downloading result to " + filename + " with content type " + content_type ) ;
40
+ download ( http . response , filename , content_type ) ;
41
+ } else {
42
+ alert ( "A remote mapping error occured. Please check server logs for details." )
43
+ }
40
44
document . getElementById ( "progress" ) . hidden = true
41
45
document . getElementById ( "downloadButton" ) . hidden = true
42
46
document . getElementById ( "submit" ) . disabled = false
You can’t perform that action at this time.
0 commit comments