Commit 8b80d620 by liyijie

remove document type validation

parent e3e24717
......@@ -22,20 +22,20 @@ module Whaleback
class Obj
class Document < Obj
validates_attachment_size :file, less_than: 500.megabytes
validates_attachment_content_type :file,
content_type: [
"application/pdf",
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/msword",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.ms-powerpoint",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"application/wps-writer",
"text/plain",
"application/zip",
"application/json"
]
# validates_attachment_content_type :file,
# content_type: [
# "application/pdf",
# "application/vnd.ms-excel",
# "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
# "application/msword",
# "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
# "application/vnd.ms-powerpoint",
# "application/vnd.openxmlformats-officedocument.presentationml.presentation",
# "application/wps-writer",
# "text/plain",
# "application/zip",
# "application/json"
# ]
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