From 4460de58fd45e63024f22a665c97b2c3c6052339 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 27 Apr 2021 21:32:34 +0900 Subject: [PATCH] Add missing result fields to procFileIframeUpload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 모바일 스킨에서 파일 업로드 자체구현할 때 종종 사용하는 액션인데 mp4 썸네일 주소 등 라이믹스에서 추가한 필드들이 반환되지 않아 스킨에서 연동하기 어려운 문제를 보완합니다. --- modules/file/file.controller.php | 1 + modules/file/tpl/iframe.html | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index 0be79a23d..45016d6b6 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -198,6 +198,7 @@ class fileController extends file if(is_uploaded_file($file_info['tmp_name'])) { $output = $this->insertFile($file_info, $module_srl, $upload_target_srl); Context::set('uploaded_fileinfo',$output); + Context::set('module_srl', $module_srl); } Context::set('layout','none'); diff --git a/modules/file/tpl/iframe.html b/modules/file/tpl/iframe.html index a2d41bd9f..7f82a9080 100644 --- a/modules/file/tpl/iframe.html +++ b/modules/file/tpl/iframe.html @@ -10,6 +10,13 @@ uploaded_fileinfo.source_filename = '{$uploaded_fileinfo->get('source_filename')}'; uploaded_fileinfo.upload_target_srl = '{$uploaded_fileinfo->get('upload_target_srl')}'; uploaded_fileinfo.uploaded_filename = '{$uploaded_fileinfo->get('uploaded_filename')}'; + + uploaded_fileinfo.download_url = '{FileModel::getDirectFileUrl($uploaded_fileinfo->get("uploaded_filename"))}'; + + uploaded_fileinfo.download_url = '{FileModel::getDownloadUrl($uploaded_fileinfo->get("file_srl"), $uploaded_fileinfo->get("sid"), $module_srl)}'; + + uploaded_fileinfo.thumbnail_filename = '{$uploaded_fileinfo->get("thumbnail_filename")}'; + uploaded_fileinfo.original_type = '{$uploaded_fileinfo->get("original_type")}'; uploaded_fileinfo.error = -1; uploaded_fileinfo.message = '{$uploaded_fileinfo->message}';