Skip to content

Commit

Permalink
Pass randomize and expires in upload
Browse files Browse the repository at this point in the history
  • Loading branch information
andreimarcu committed Oct 1, 2015
1 parent 3135949 commit fcb9afd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions static/js/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<a target="_blank" href="' + resp.url + '">' + resp.url + '</a>';
Expand Down

0 comments on commit fcb9afd

Please sign in to comment.