Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
limit uploads to accepted file types
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Apr 2, 2014
1 parent 453df6e commit 4ec460d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -135,7 +135,8 @@
data.context.each(function (index) {
var error = data.files[index].error;
if (error) {
$(this).find('.error').text(error);
$(this).find('.fileupload-error').text(error)
.removeClass('is-invisible');
}
});
}
Expand Down
Expand Up @@ -20,7 +20,8 @@ $(function () {

uploadForm.fileupload({
sequentialUploads: true,
dropZone: dropZone
dropZone: dropZone,
acceptFileTypes: /(\.|\/)(pot|dtd|txt|idml|html?|od[tpsg])$/i
});

// FIXME may be unnecessary. If necessary, it could just go in the above options
Expand Down

0 comments on commit 4ec460d

Please sign in to comment.