If file is recognized as office file, it's allowed to be any office file type.

This commit is contained in:
Matej Zrimšek 2016-09-07 13:04:12 +02:00
parent f4d4977457
commit 40355dcc97
3 changed files with 7 additions and 7 deletions

View file

@ -760,7 +760,7 @@ module FirstTimeDataGenerator
DelayedUploaderTutorial.delay(queue: :tutorial).add_step_asset(
step: my_modules[7].protocol.steps.where("position = 0").take,
current_user: user,
file_name: "ddCq-quantification_diagnostics-trmplate.xls"
file_name: "ddCq-quantification_diagnostics-template.xls"
)
# Add result

View file

@ -177,7 +177,7 @@ module Paperclip
#
# Word processor application
(Set[content_type, content_types_from_name].subset? Set.new %w(
application/msword
application/vnd.ms-office
application/msword
application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/vnd.openxmlformats-officedocument.wordprocessingml.template
@ -196,8 +196,7 @@ module Paperclip
)) ||
# Spreadsheet application
(Set[content_type, content_types_from_name].subset? Set.new %w(
application/vnd.ms-excel
application/vnd.ms-excel
application/vnd.ms-office
application/vnd.ms-excel
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
application/vnd.openxmlformats-officedocument.spreadsheetml.template
@ -214,9 +213,7 @@ module Paperclip
)) ||
# Presentation application
(Set[content_type, content_types_from_name].subset? Set.new %w(
application/vnd.ms-powerpoint
application/vnd.ms-powerpoint
application/vnd.ms-powerpoint
application/vnd.ms-office
application/vnd.ms-powerpoint
application/vnd.openxmlformats-officedocument.presentationml.presentation
application/vnd.openxmlformats-officedocument.presentationml.template
@ -235,6 +232,7 @@ module Paperclip
)) ||
# Graphics application
(Set[content_type, content_types_from_name].subset? Set.new %w(
application/vnd.ms-office
application/vnd.oasis.opendocument.graphics
application/vnd.oasis.opendocument.graphics-template
application/vnd.sun.xml.draw
@ -244,6 +242,7 @@ module Paperclip
)) ||
# Formula application
(Set[content_type, content_types_from_name].subset? Set.new %w(
application/vnd.ms-office
application/vnd.oasis.opendocument.formula
application/vnd.sun.xml.math
application/vnd.stardivision.math
@ -251,6 +250,7 @@ module Paperclip
)) ||
# Chart application
(Set[content_type, content_types_from_name].subset? Set.new %w(
application/vnd.ms-office
application/vnd.oasis.opendocument.chart
application/vnd.stardivision.chart
application/x-starchart