diff --git a/rhodecode/controllers/files.py b/rhodecode/controllers/files.py --- a/rhodecode/controllers/files.py +++ b/rhodecode/controllers/files.py @@ -317,6 +317,10 @@ class FilesController(BaseRepoController h.flash(_('No content'), category='warning') return redirect(url('changeset_home', repo_name=c.repo_name, revision='tip')) + if not filename: + h.flash(_('No filename'), category='warning') + return redirect(url('changeset_home', repo_name=c.repo_name, + revision='tip')) try: self.scm_model.create_node(repo=c.rhodecode_repo, diff --git a/rhodecode/templates/files/files_add.html b/rhodecode/templates/files/files_add.html --- a/rhodecode/templates/files/files_add.html +++ b/rhodecode/templates/files/files_add.html @@ -46,6 +46,7 @@