diff --git a/libraries/webInterface/gui/index.js b/libraries/webInterface/gui/index.js index fc4e9242d..5956e4e2a 100644 --- a/libraries/webInterface/gui/index.js +++ b/libraries/webInterface/gui/index.js @@ -1121,7 +1121,7 @@ realityServer.gotClick = function (event) { realityServer.myTargetDropzone.on('error', function(file, message) { if (typeof message.error !== 'undefined') { - showErrorNotification(message.error); + showErrorNotification(message.error, 10000); // show for 10 seconds } }); } else { diff --git a/server.js b/server.js index 27038bf58..2a2eb386e 100644 --- a/server.js +++ b/server.js @@ -4295,7 +4295,7 @@ function objectWebServer() { console.log('targetUpload', req.params.id); var fileExtension = getFileExtension(filename); - if (fileExtension === 'jpg' || fileExtension === 'dat') { + if (fileExtension === 'jpg' || fileExtension === 'dat' || fileExtension === 'xml') { if (!fs.existsSync(folderD + '/' + identityFolderName + '/target/')) { fs.mkdirSync(folderD + '/' + identityFolderName + '/target/', '0766', function (err) { if (err) { @@ -4547,8 +4547,12 @@ function objectWebServer() { console.log('could not unzip file'); } } else { - res.status(200); - res.send('done'); + let errorString = 'File type is not recognized target data. ' + + 'You uploaded .' + fileExtension + ' but only ' + + '.dat, .jpg, .xml, and .zip are supported.'; + res.status(400).send({ + error: errorString + }); } } else {