Skip to content

Commit

Permalink
Merge pull request #4252 from bgeuken/depfu_pr_update_data_migrate
Browse files Browse the repository at this point in the history
Depfu pr update data migrate
  • Loading branch information
hennevogel committed Dec 19, 2017
2 parents 53856c6 + df2da8b commit c842915
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/api/Gemfile.lock
Expand Up @@ -105,7 +105,7 @@ GEM
cssmin (1.0.3)
daemons (1.2.5)
dalli (2.7.6)
data_migrate (3.2.2)
data_migrate (3.3.0)
rails (>= 4.0)
database_cleaner (1.6.2)
delayed_job (4.1.3)
Expand Down Expand Up @@ -190,14 +190,11 @@ GEM
loofah (2.1.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.6.6)
mime-types (>= 1.16, < 4)
mail (2.7.0)
mini_mime (>= 0.1.1)
metaclass (0.0.4)
method_source (0.9.0)
middleware (0.1.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.10.3)
Expand Down Expand Up @@ -290,7 +287,7 @@ GEM
rainbow (2.2.2)
rake
raindrops (0.18.0)
rake (12.2.1)
rake (12.3.0)
rantly (1.1.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
Expand Down
2 changes: 1 addition & 1 deletion src/api/lib/backend/file.rb
Expand Up @@ -30,7 +30,7 @@ def file=(input_stream)
# Sets the content File object from a path
def file_from_path(path)
@file = ::File.open(path)
@response = { type: MIME::Types.type_for(::File.basename(@file.path)).first.try(:content_type), status: 200, size: @file.size }
@response = { type: MiniMime.lookup_by_filename(@file.path).try(:content_type), status: 200, size: @file.size }
@file.close
end

Expand Down

0 comments on commit c842915

Please sign in to comment.