aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorPitu <[email protected]>2017-10-03 17:56:44 -0300
committerPitu <[email protected]>2017-10-03 17:56:44 -0300
commitd1260563d45bde77d438d3bd5a9dcef525c7e515 (patch)
treef15c44d65e5cce1c4e2fba22d63e171fc9aa44d3 /public
parentModified gitignore (diff)
parentAdded support link (diff)
downloadhost.fuwn.me-d1260563d45bde77d438d3bd5a9dcef525c7e515.tar.xz
host.fuwn.me-d1260563d45bde77d438d3bd5a9dcef525c7e515.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'public')
-rw-r--r--public/js/home.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/public/js/home.js b/public/js/home.js
index 2ec27e7..4412ac5 100644
--- a/public/js/home.js
+++ b/public/js/home.js
@@ -5,6 +5,7 @@ upload.token = localStorage.token;
upload.maxFileSize;
// add the album var to the upload so we can store the album id in there
upload.album;
+upload.myDropzone;
upload.checkIfPublic = function(){
axios.get('/api/check')
@@ -131,8 +132,8 @@ upload.prepareDropzone = function(){
'token': upload.token
},
init: function() {
+ upload.myDropzone = this;
this.on('addedfile', function(file) {
- myDropzone = this;
document.getElementById('uploads').style.display = 'block';
});
// add the selected albumid, if an album is selected, as a header
@@ -184,7 +185,7 @@ window.addEventListener('paste', function(event) {
var file = new File([blob], "pasted-image."+blob.type.match(/(?:[^\/]*\/)([^;]*)/)[1]);
file.type = blob.type;
console.log(file);
- myDropzone.addFile(file);
+ upload.myDropzone.addFile(file);
}
}
});