diff --git a/lib/gollum/public/gollum/javascript/editor/gollum.editor.js.erb b/lib/gollum/public/gollum/javascript/editor/gollum.editor.js.erb index 0f9a9660..a11ab085 100755 --- a/lib/gollum/public/gollum/javascript/editor/gollum.editor.js.erb +++ b/lib/gollum/public/gollum/javascript/editor/gollum.editor.js.erb @@ -261,7 +261,11 @@ window.ace_editor.insert(text); }, error: function(r, textStatus, errorThrown) { - alert('Error uploading file: ' + textStatus + ' ' + errorThrown); + if (data.status == 409) { + alert('This file already exists.'); + } else { + alert('Error uploading file: ' + textStatus + ' ' + errorThrown); + } $editorBody.removeClass('uploading'); } });