Index: app/controllers/files_controller.rb =================================================================== --- app/controllers/files_controller.rb (revision 13959) +++ app/controllers/files_controller.rb (working copy) @@ -47,9 +47,15 @@ attachments = Attachment.attach_files(container, params[:attachments]) render_attachment_warning_if_needed(container) - if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added') - Mailer.attachments_added(attachments[:files]).deliver + if attachments.any? && !attachments[:files].blank? + if Setting.notified_events.include?('file_added') + Mailer.attachments_added(attachments[:files]).deliver + end + flash[:notice] = l(:label_file_added) + redirect_to project_files_path(@project) + else + flash[:error] = l(:label_file_error) + redirect_to :action => :new end - redirect_to project_files_path(@project) end end Index: config/locales/en.yml =================================================================== --- config/locales/en.yml (revision 13959) +++ config/locales/en.yml (working copy) @@ -593,6 +593,7 @@ label_attachment_delete: Delete file label_attachment_plural: Files label_file_added: File added + label_file_error: Error in File label_report: Report label_report_plural: Reports label_news: News