From fcb9afde0d9febe754c161f344768e59d0fa1664 Mon Sep 17 00:00:00 2001 From: andreimarcu Date: Wed, 30 Sep 2015 23:55:03 -0400 Subject: [PATCH] Pass randomize and expires in upload --- static/js/upload.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/upload.js b/static/js/upload.js index d86f456..df820b8 100644 --- a/static/js/upload.js +++ b/static/js/upload.js @@ -32,6 +32,10 @@ Dropzone.options.dropzone = { file.rightRightElement.innerHTML = p + "%"; file.uploadElement.setAttribute("style", 'background-image: -webkit-linear-gradient(left, #F2F4F7 ' + p + '%, #E2E2E2 ' + p + '%); background-image: -moz-linear-gradient(left, #F2F4F7 ' + p + '%, #E2E2E2 ' + p + '%); background-image: -ms-linear-gradient(left, #F2F4F7 ' + p + '%, #E2E2E2 ' + p + '%); background-image: -o-linear-gradient(left, #F2F4F7 ' + p + '%, #E2E2E2 ' + p + '%); background-image: linear-gradient(left, #F2F4F7 ' + p + '%, #E2E2E2 ' + p + '%)'); }, + sending: function(file, xhr, formData) { + formData.append("randomize", document.getElementById("randomize").checked); + formData.append("expires", document.getElementById("expires").selectedOptions[0].value); + }, success: function(file, resp) { file.rightLeftElement.innerHTML = ""; file.leftElement.innerHTML = '' + resp.url + '';