Commit 8b80d620 by liyijie

remove document type validation

parent e3e24717
...@@ -22,20 +22,20 @@ module Whaleback ...@@ -22,20 +22,20 @@ module Whaleback
class Obj class Obj
class Document < Obj class Document < Obj
validates_attachment_size :file, less_than: 500.megabytes validates_attachment_size :file, less_than: 500.megabytes
validates_attachment_content_type :file, # validates_attachment_content_type :file,
content_type: [ # content_type: [
"application/pdf", # "application/pdf",
"application/vnd.ms-excel", # "application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", # "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/msword", # "application/msword",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", # "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.ms-powerpoint", # "application/vnd.ms-powerpoint",
"application/vnd.openxmlformats-officedocument.presentationml.presentation", # "application/vnd.openxmlformats-officedocument.presentationml.presentation",
"application/wps-writer", # "application/wps-writer",
"text/plain", # "text/plain",
"application/zip", # "application/zip",
"application/json" # "application/json"
] # ]
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment