Skip to content

Commit

Permalink
Fix #2057 XEVE-17-016 파일 업로드 시 문제 고침
Browse files Browse the repository at this point in the history
- 제보자 : @conory
- 패치제공 : @kijin
  • Loading branch information
bnu committed Mar 8, 2017
1 parent fa1c5d8 commit 97c21dc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion modules/file/file.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,20 @@ function procFileIframeUpload()
if(!$upload_target_srl) $upload_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
// Create if upload_target_srl is not defined in the session information
if(!$upload_target_srl) $_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = getNextSequence();

// Delete and then attempt to re-upload if file_srl is requested
$file_srl = Context::get('file_srl');
if($file_srl) $this->deleteFile($file_srl);
if($file_srl)
{
$oFileModel = getModel('file');
$logged_info = Context::get('logged_info');
$file_info = $oFileModel->getFile($file_srl);
$file_grant = $oFileModel->getFileGrant($file_info, $logged_info);
if($file_info->file_srl == $file_srl && $file_grant->is_deletable)
{
$this->deleteFile($file_srl);
}
}

$file_info = Context::get('Filedata');
// An error appears if not a normally uploaded file
Expand Down

0 comments on commit 97c21dc

Please sign in to comment.