diff --git a/research/static/research/js/research.js b/research/static/research/js/research.js index 37b48d94..d068df69 100644 --- a/research/static/research/js/research.js +++ b/research/static/research/js/research.js @@ -428,7 +428,19 @@ $(function () { browse(path) }) r.on('fileSuccess', function (file, message) { - $('#' + file.uniqueIdentifier + ' .msg').html("Upload complete") + try { + decodeURIComponent(escape(file.name)); + } catch (e) { + $('#' + file.uniqueIdentifier).prepend(` +
+
+ Uploaded file will be renamed because not all non UTF-8 characters are supported. +
+
+ `); + } + + $('#' + file.uniqueIdentifier + ' .msg').html("Upload complete"); const $self = $('#' + file.uniqueIdentifier) $self.find('.upload-btns').hide() const path = $('.upload').attr('data-path')