diff --git a/deposit/static/deposit/js/data.js b/deposit/static/deposit/js/data.js index 719efe8a..a2b88e2d 100644 --- a/deposit/static/deposit/js/data.js +++ b/deposit/static/deposit/js/data.js @@ -237,6 +237,7 @@ $(function () { r.cancel() $('#files').html('') $('#uploads').addClass('hidden') + $('#unsupportedCharsWarning').addClass('hidden') // clear information present for next time dialog is presented $('.uploads-progress-information').html('') $('.uploads-total-progress-bar').css('width', '0%') @@ -262,6 +263,11 @@ $(function () { const folderName = file.relativePath.substring(0, file.relativePath.indexOf('/')) let overwrite = false + const diamondQuestionMarkPattern = /\uFFFD/ + if (diamondQuestionMarkPattern.test(file.name)) { + $('#unsupportedCharsWarning').removeClass('hidden') + } + const $self = $('#' + file.uniqueIdentifier) // Pause btn $self.find('.upload-pause').on('click', function () { diff --git a/deposit/templates/deposit/data.html b/deposit/templates/deposit/data.html index abb0b3ec..6497fea9 100644 --- a/deposit/templates/deposit/data.html +++ b/deposit/templates/deposit/data.html @@ -45,6 +45,9 @@