Merge pull request #2494 from techAPJ/bulk-invite-4

FEATURE: support txt file to be uploaded for bulk invite
This commit is contained in:
Sam 2014-07-03 17:33:16 +10:00
commit db34b534e6
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ class InvitesController < ApplicationController
guardian.ensure_can_bulk_invite_to_forum!(current_user)
filename = params.fetch(:resumableFilename)
return render status: 415, text: I18n.t("bulk_invite.file_should_be_csv") unless filename.to_s.end_with?(".csv")
return render status: 415, text: I18n.t("bulk_invite.file_should_be_csv") unless (filename.to_s.end_with?(".csv") || filename.to_s.end_with?(".txt"))
file = params.fetch(:file)
identifier = params.fetch(:resumableIdentifier)

View File

@ -40,7 +40,7 @@ en:
load_from_remote: "There was an error loading that post."
bulk_invite:
file_should_be_csv: "The uploaded file should be of csv format."
file_should_be_csv: "The uploaded file should be of csv or txt format."
backup:
operation_already_running: "An operation is currently running. Can't start a new job right now."