diff --git a/public/dist/scripts/app-all.js b/public/dist/scripts/app-all.js index f68cde9112..9ed39616d7 100644 --- a/public/dist/scripts/app-all.js +++ b/public/dist/scripts/app-all.js @@ -2649,7 +2649,7 @@ var units=si?["KB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB", preview.innerHTML="";count.innerHTML="0 / "+max;files.map(function(obj){var file=document.createElement("li");var image=document.createElement("img");image.src=image.src=env.API+"/storage/files/"+ obj+"/preview?width="+ previewWidth+"&height="+ -previewHeight;file.className="file avatar";file.tabIndex=0;file.appendChild(image);count.innerHTML=files.length+" / "+max;preview.appendChild(file);if(files.length>=max){input.disabled=true;upload.classList.add("disabled");}else{input.disabled=false;upload.classList.remove("disabled");} +previewHeight+"&project=console";file.className="file avatar";file.tabIndex=0;file.appendChild(image);count.innerHTML=files.length+" / "+max;preview.appendChild(file);if(files.length>=max){input.disabled=true;upload.classList.add("disabled");}else{input.disabled=false;upload.classList.remove("disabled");} var remove=(function(obj){return function(event){output=Array.isArray(output)?output.filter(function(e){return e!==obj;}):[];render(output);};})(obj);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=multiple?JSON.stringify(output):output[0];});};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));if(!multiple){output=[];} sdk.storage.createFile(files[0],read,write,1).then(function(response){response.map(function(obj){if(!Array.isArray(output)){throw new Error("Can't append new file to non array value");} output[output.length]=obj["$uid"];});onComplete(message);render(output);},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;} diff --git a/public/dist/scripts/app.js b/public/dist/scripts/app.js index 2b72ab4634..1e0d0d940e 100644 --- a/public/dist/scripts/app.js +++ b/public/dist/scripts/app.js @@ -375,7 +375,7 @@ var units=si?["KB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB", preview.innerHTML="";count.innerHTML="0 / "+max;files.map(function(obj){var file=document.createElement("li");var image=document.createElement("img");image.src=image.src=env.API+"/storage/files/"+ obj+"/preview?width="+ previewWidth+"&height="+ -previewHeight;file.className="file avatar";file.tabIndex=0;file.appendChild(image);count.innerHTML=files.length+" / "+max;preview.appendChild(file);if(files.length>=max){input.disabled=true;upload.classList.add("disabled");}else{input.disabled=false;upload.classList.remove("disabled");} +previewHeight+"&project=console";file.className="file avatar";file.tabIndex=0;file.appendChild(image);count.innerHTML=files.length+" / "+max;preview.appendChild(file);if(files.length>=max){input.disabled=true;upload.classList.add("disabled");}else{input.disabled=false;upload.classList.remove("disabled");} var remove=(function(obj){return function(event){output=Array.isArray(output)?output.filter(function(e){return e!==obj;}):[];render(output);};})(obj);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=multiple?JSON.stringify(output):output[0];});};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));if(!multiple){output=[];} sdk.storage.createFile(files[0],read,write,1).then(function(response){response.map(function(obj){if(!Array.isArray(output)){throw new Error("Can't append new file to non array value");} output[output.length]=obj["$uid"];});onComplete(message);render(output);},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;} diff --git a/public/scripts/views/forms/upload.js b/public/scripts/views/forms/upload.js index e91551afa3..a1a576850b 100644 --- a/public/scripts/views/forms/upload.js +++ b/public/scripts/views/forms/upload.js @@ -102,7 +102,8 @@ "/preview?width=" + previewWidth + "&height=" + - previewHeight; + previewHeight + + "&project=console"; file.className = "file avatar"; file.tabIndex = 0;