diff --git a/src/main/twirl/helper/attached.scala.html b/src/main/twirl/helper/attached.scala.html index 07cf2df..7ae78c9 100644 --- a/src/main/twirl/helper/attached.scala.html +++ b/src/main/twirl/helper/attached.scala.html @@ -10,11 +10,13 @@ $('#@textareaId').closest('div').dropzone({ url: '@path/upload/image/@owner/@repository', maxFilesize: 10, + acceptedFiles: 'image/*', + dictInvalidFileType: 'Unfortunately, we don\'t support that file type. Try again with a PNG, GIF, or JPG.', previewTemplate: "
\n
Uploading your images...
\n
\n
", success: function(file, id) { var images = '\n![' + file.name.split('.')[0] + '](@baseURL/@owner/@repository/_attached/' + id + ')'; $('#@textareaId').val($('#@textareaId').val() + images); - file.previewElement.remove(); + $(file.previewElement).prevAll('div.dz-preview').addBack().remove(); } }); });