附件为视频时,点击播放
This commit is contained in:
parent
69e611c427
commit
bc58efa397
|
@ -127,7 +127,7 @@ class AttachmentsController < ApplicationController
|
|||
|
||||
# 附件为视频时,点击播放
|
||||
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.mkdir(dir_path) unless Dir.exist?(dir_path)
|
||||
if params[:status] == "preview"
|
||||
|
|
Loading…
Reference in New Issue