Skip to content

Commit

Permalink
only add when upload coede is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed Sep 7, 2023
1 parent 61acb54 commit 307243a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/pictshare.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ $(function () {
myDropzone.options.maxFilesize = maxUploadFileSize;
myDropzone.options.timeout = 0,
myDropzone.on("sending", function(file, xhr, formData) {
formData.append("uploadcode", document.getElementById("uploadcode").value);
if(document.getElementById("uploadcode"))
formData.append("uploadcode", document.getElementById("uploadcode").value);
});
myDropzone.on('error', function(file, response) {
alert("Error: "+response.reason);
Expand Down

0 comments on commit 307243a

Please sign in to comment.