Merge pull request 'fixed 附件为视频时,点击播放' (#274) from standalone_develop into pre_trustie_server

This commit is contained in:
xxq250 2024-04-10 09:22:45 +08:00
commit 957a8f9d85
1 changed files with 1 additions and 1 deletions

View File

@ -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"