Skip to content

Commit

Permalink
Merge pull request #2170 from sparc-request/saw-txt-upload-bug
Browse files Browse the repository at this point in the history
SAW - Plain text document upload bug
  • Loading branch information
Stuart-Johnson committed Jan 24, 2020
2 parents b862b59 + e4c5a20 commit bc6083b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class Document < ApplicationRecord
audited

SUPPORTED_FILE_TYPES = [
/\.pdf$/i, /\.docx?$/i, /\.xlsx?$/i, /\.rtf$/i,
/\.txt$/i, /\.csv$/i, /\.ppt?$/i, /\.msg$/i,
/\.eml$/i, /\.jpg$/i, /\.gif$/i, /\.png$/i,
/\.tiff$/i, /\.jpeg$/i
/\.pdf$/i, /\.docx?$/i, /\.xlsx?$/i, /\.txt$/i,
/\.csv$/i, /\.ppt?$/i, /\.msg$/i, /\.eml$/i,
/\.jpg$/i, /\.gif$/i, /\.png$/i, /\.tiff$/i,
/\.jpeg$/i
]

belongs_to :protocol
Expand Down
6 changes: 6 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ en:
visit_groups:
invalid: "Please specify a day for each visit"
out_of_order: "Please make sure all visit days are in sequential order"
document:
attributes:
document:
spoofed_media_type: "File type does not match file content"
document_file_name:
invalid: "Invalid file type"
form:
attributes:
active:
Expand Down

0 comments on commit bc6083b

Please sign in to comment.