Merge pull request 'fixed 附件为视频时,点击播放' (#274) from standalone_develop into pre_trustie_server
This commit is contained in:
commit
957a8f9d85
|
@ -127,7 +127,7 @@ class AttachmentsController < ApplicationController
|
||||||
|
|
||||||
# 附件为视频时,点击播放
|
# 附件为视频时,点击播放
|
||||||
def preview_attachment
|
def preview_attachment
|
||||||
attachment = Attachment.find_by(id: params[:id])
|
attachment = Attachment.where_id_or_uuid(params[:id]).first
|
||||||
dir_path = "#{Rails.root}/public/preview"
|
dir_path = "#{Rails.root}/public/preview"
|
||||||
Dir.mkdir(dir_path) unless Dir.exist?(dir_path)
|
Dir.mkdir(dir_path) unless Dir.exist?(dir_path)
|
||||||
if params[:status] == "preview"
|
if params[:status] == "preview"
|
||||||
|
|
Loading…
Reference in New Issue