Skip to content

Commit

Permalink
Merge pull request #6 from j-omine/master
Browse files Browse the repository at this point in the history
バージョンアップの不具合修正
  • Loading branch information
mikosu3 authored Dec 8, 2018
2 parents d3b30f3 + a50fa83 commit 58dbf58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/controllers/videos_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ def destroy_all
# zipファイルDL
def zip
dl_file = Video.create_dl_zip(@video.id)
stat = File::stat(dl_file)
send_file(dl_file, :filename => ERB::Util.url_encode(@video.name)+ '_' + Time.now.strftime('%Y%m%d%H%M%S') + '.zip', :length => stat.size)
send_file(dl_file, type: 'application/zip', :filename => ERB::Util.url_encode(@video.name)+ '_' + Time.now.strftime('%Y%m%d%H%M%S') + '.zip')
end

private
Expand Down
2 changes: 2 additions & 0 deletions app/models/video.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ def self.get_dl_video_info(id)
model_name
,disp_name
,distribution
,extension
,status
ORDER BY
extension ASC
,model_name ASC;
Expand Down
2 changes: 1 addition & 1 deletion app/views/videos/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
td.text-right
= video.yets
td
= link_to zip_video_path(video), class: "btn btn-default btn-sm" do
= link_to zip_video_path(video), class: "btn btn-default btn-sm", data: { turbolinks: false } do
i.glyphicon.glyphicon-download-alt
| ダウンロード
= paginate(@videos)

0 comments on commit 58dbf58

Please sign in to comment.