From 61960704b01381373428cc78cac5e44c198abcc3 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 3 Jul 2016 19:58:41 +0200 Subject: [PATCH] webbuild.js: fixes --- cgi-bin/webbuild-webbuild-arm.cgi | 2 +- scripts/webbuild/webbuild.js | 34 ++++++++++++++++++------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/cgi-bin/webbuild-webbuild-arm.cgi b/cgi-bin/webbuild-webbuild-arm.cgi index e17a32d..d48f941 100755 --- a/cgi-bin/webbuild-webbuild-arm.cgi +++ b/cgi-bin/webbuild-webbuild-arm.cgi @@ -1,7 +1,7 @@ #!/bin/bash WEBBUILD_HOST=mambanana if [ "$QUERY_STRING" ]; then - # get (download, preserve content-type and content-disposition headrs) + # get (download, preserve content-type and content-disposition headers) contentdisposition=`curl -4 --connect-timeout 40 -sI "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" | grep Content-Disposition` echo "\ $contentdisposition diff --git a/scripts/webbuild/webbuild.js b/scripts/webbuild/webbuild.js index 83f7fc8..78c0e15 100644 --- a/scripts/webbuild/webbuild.js +++ b/scripts/webbuild/webbuild.js @@ -185,14 +185,21 @@ function getDownload(request) { // ajaxFileUpload jQuery.extend({ - + handleError: function( s, xhr, status, e ) { + // If a local callback was specified, fire it + if ( s.error ) + s.error( xhr, status, e ); + // If we have some XML response text (e.g. from an AJAX call) then log it in the console + else if(xhr.responseText) + console.log(xhr.responseText); + }, createUploadIframe: function(id, uri) { //create frame var frameId = 'jUploadFrame' + id; var iframeHtml = '