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