로그인

검색

Extra Form

elfinder Cloud Thumbnailselfinder Cloud Thumbnail Setting


엘파인터에서 클라우드와 같이 썸네일을 표시할 수 없는 다른위치에 있는 파일의 썸네일을 표현하는 방법 

 

서버에서 실제파일의 위치는 /Documents 에 있고, 

웹서비스 루트는 /publichtml 인경우 

elfinder 의 기본 설정 connector.php 파일 

$opts = array(...) 부분에서

    'roots' => array(...) 부분의 // Items volume 내용을 수정하여 실제파일의 경로와  Mimetype, Access 방법, 썸네일 구성을 설정하게 됩니다. 

서비스하려는 파일이 웹 루트(publichtml) 안에 위치하는 경우 기본 썸네일은 파일의 기본경로에 있는 .tmb 폴더에 기록됩니다. 따라서 특별한 설정을 하지 않더라도 사용자가 웹서비스를 통해 해당 경로에 접근하게 되면 자동을 .tmb 폴더를 생성하여 썸네일이 만들어지게 됩니다. 

 

그러나 클라우드 드라이브나, ftp 를 통한 연결, 웹서비스 스토리지내의 웹루트의 상위 경로 등 웹서비스 경로가 아닌 위치에 접근하도록 설정하는 경우 다음과 같은 문제가 발생합니다. 

  • 실제파일을 서비스하고자 하는 경로의 .tmb 가 생성되고 이 위치에 썸네일이 생성됨
  • 생성된 썸네일을 불러오고자 하는 경우 웹 루트(publichtml)에 위치하지 않으므로 이 썸네일 파일은 잘못된 URL을 가지게 됨. 따라서 썸네일은 생성이 되었으나 웹에서 이 썸네일을 보여줄수 없음. 
    - 예) /Documents/.tmb/생성된썸네일.png → 웹서비스) 도메인/../Documents/.tmb/생성된썸네일.png 
      즉, https://yangel.familyds.com/Documents/.tmb/생성된썸네일.png 와 같은 형태로 서비스 되므로 실제 이미지는 보이지 않음. 

[해결방법]

  1. 웹루트 아래에 썸네일을 위한 폴더를 생성함.
    예시) /publichtml/TMP/.tmb    // 소유자 html, 권한 777
  2. 실제서비스할 폴더의 권한을 웹에서 읽을 수 있도록 허용 
    예시) /Documents                 // 소유자 html, 권한 755, 777 보안을 고려하여 적당히 설정
  3. connector.php 에서 $opts = array(...); 을 벗어난 위치에 아래 내용 설정 
    Cloud Volumes 설정을 위한 경로와 보관 기간 등 생성
    // Thumbnail settings for cloud volumes
    	$tmbConfig = array(
    	    'tmbPath'          => '../TMP/.tmb',
    	    'tmbURL'           => dirname($_SERVER['PHP_SELF']) . '/../TMP/.tmb/',
    	    'tmbGcMaxlifeHour' => 2160, // 90 days
    	    'tmbGcPercentage'  => 5,    // 5 execute / 100 tmb querys
    	);
  4. connector.php 에서 $opts = array(...); 을 벗어난 위치에 아래 내용 설정
    $opts['roots'][] = array_merge($tmbConfig,
    	  array(
    	       'phash' => 'g1_Lw',   // 소속 그룹 설정
    	      'driver' => 'LocalFileSystem',   // driver for accessing file system (REQUIRED)
    	        'path' => '../../../Documents/',  // 파일 서비스 경로
    	   'trashHash' => 't1_Lw',     // 휴지통 그룹 명칭
    	  'winHashFix' => DIRECTORY_SEPARATOR !== '/',
    	  'uploadDeny' => array('all'),  // 거부할 Mimetypes
    	 'uploadAllow' => array('all'),  // 허용할 Mimetypes
    	 'uploadOrder' => array('deny', 'allow'), // 허용, 거부 등 
    	       'alias' => 'ShareSpace',   // 표시할 이름  
    	'accessControl' => 'access', 
    	     'defaults' => array('read' => true, 'write' => true),
    	       'tmbURL' => dirname($_SERVER['PHP_SELF']) . '/../TMP/.tmb/'
    	  )
    	);

     
  5. $tmbConfig 를 변형하여 다수의 경로를 등록할 수 있음
     

    // Thumbnail settings for cloud volumes
    	$tmbConfig1 = array(
    	      'tmbPath' => '../TMP/.tmb1',
    	       'tmbURL' => dirname($_SERVER['PHP_SELF']) . '/../TMP/.tmb1/',
    	); 
    	$tmbConfig2 = array(
    	      'tmbPath' => '../TMP/.tmb2',
    	       'tmbURL' => dirname($_SERVER['PHP_SELF']) . '/../TMP/.tmb2/',
    	);
    // Cloud Volumes Setting
    	$opts['roots'][] = array_merge($tmbConfig1,
    	  array(
    	  'phash'   => 'g1_Lw',                // 소속 그룹 설정
    	  'driver'        => 'LocalFileSystem',           // driver for accessing file system (REQUIRED)
    	  'path'          => '../../../Documents/',                 // path to files (REQUIRED)
    	  'trashHash'     => 't1_Lw',                     // elFinder's hash of trash folder
    	  'winHashFix'    => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
    	  'uploadDeny'    => array('all'),                // All Mimetypes not allowed to upload
    	  'uploadAllow'   => array('all'),                // Mimetype `image` and `text/plain` allowed to upload
    	  'uploadOrder'   => array('deny', 'allow'),      // allowed Mimetype `image` and `text/plain` only
    	  'alias'         => 'ShareSpace', 
    	  'accessControl' => 'access',                     // disable and hide dot starting files (OPTIONAL)
    	  'defaults' => array('read' => true, 'write' => true),
    	  'tmbURL'        => dirname($_SERVER['PHP_SELF']) . '/../files/.tmb1/'
    	)
    	);
    	
    	$opts['roots'][] = array_merge($tmbConfig2,
    	array(
    	   'phash'   => 'g1_Lw',                // 소속 그룹 설정
    	   'driver'        => 'LocalFileSystem',           // driver for accessing file system (REQUIRED)
    	   'path'          => '../../../Camera/',                 // path to files (REQUIRED)
    	   'trashHash'     => 't1_Lw',                     // elFinder's hash of trash folder
    	   'winHashFix'    => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
    	   'uploadDeny'    => array('all'),                // All Mimetypes not allowed to upload
    	   'uploadAllow'   => array('all'),                // Mimetype `image` and `text/plain` allowed to upload
    	   'uploadOrder'   => array('deny', 'allow'),      // allowed Mimetype `image` and `text/plain` only
    	   'alias'         => 'Photos', 
    	   'accessControl' => 'access',                     // disable and hide dot starting files (OPTIONAL)
    	   'defaults' => array('read' => true, 'write' => false),
    	   'tmbURL'        => dirname($_SERVER['PHP_SELF']) . '/../files/.tmb2/',
    	)
    	);

     


  1. 15
    Nov 2023
    15:59

    CKEditor 입력영역 배경색

    Rhymix의 기본 웹편집기인 Ckeditor 사용시 툴바영역의 기본 배경색을 지정하는 부분임(실제로 반응 없음, 다른 방법을 찾아 보세요.) 파일명 rhmix/modules/editor/tpl/js/aditor.app.js allowedContent: true, removePlugins: 'stylescombo,language,bidi,fl...
    Read More
  2. 08
    Jul 2023
    09:33

    Plugins / Font Awesome fortyTwo(fa42)

    Font Awesome fortyTwo ckeditor Plugins fa42 적용 방법입니다. fa42 는 Font-awesome 최신버전인 6.4.0 을 적용할 수 있습니다. Font-awesome 의 버전이 어떤 의미가 있는지 모르지만 최신 경향이 반영된 아이콘이 추가되었거나 그런정도의 차이가 있을 듯 ...
    Read More
  3. 06
    Jul 2023
    00:55

    elfinder Cloud Thumbnail Setting - 엘파인더에서 실제파일과 다른위치에 썸네일 만들기

    elfinder Cloud Thumbnail Setting 엘파인터에서 클라우드와 같이 썸네일을 표시할 수 없는 다른위치에 있는 파일의 썸네일을 표현하는 방법 서버에서 실제파일의 위치는 /Documents 에 있고, 웹서비스 루트는 /publichtml 인경우 elfinder 의 기본 설정 conne...
    Read More
  4. 10
    Nov 2022
    22:22

    elfinder Thumbnail Size

    elFinder 웹 파일 관리자에서 썸네일 크기를 변경하기 1. 썸네일 기본 크기 48 원하는 크기로 설정 ./php/elFinderVolumeDriver.class.php 파일에서 tmbSize 부분을 찾아서 초기값 48 을 찾아 원하는 값으로 설정함. (모든 48 을 변경해야 함) ※ 너무 크면 페...
    Read More
  5. 03
    Nov 2022
    12:56

    XE 매뉴얼

    XE 개발자 매뉴얼 v1.1 XE 스킨제작 매뉴얼 v1.1
    Read More
  6. 25
    Oct 2022
    15:41

    댓글 쓰기 권한이 없을 때 댓글 입력부분 보이지 않기

    댓글 쓰기 권한이 없는 경우 댓글 입력란 자체가 나타나지 않도록 수정하는 방법입니다. <div class="cmt_editor" style="margin-top:30px"|cond="$mi->cmt_wrt_position=='cmt_wrt_btm' && $oDocument->getCommentcount()" cond="$grant->write_document || !...
    Read More
  7. 25
    Oct 2022
    15:31

    댓글 권한없는 사용자에게 보이지 않기

    권한없는 사용자에게 댓글 보이지 않기 <ul class="fdb_lst_ul {$mi->fdb_hide}"> <block loop="$oDocument->getComments()=>$key,$comment" cond="$grant->write_document || !$comment->isSecret()"> <!--@if($comment->get('depth'))--> 11번 라인에 cond="...
    Read More
  8. 23
    Oct 2022
    14:37

    Sketchbook5 게시판 스킨에서 비밀글 목록 보이지 않기

    XE 게시판 Sketchbook5 스킨에서 권한없는 사용자에게 비밀글 목록 보이지 않도록 설정하는 방법 ✔️ 갤러리 스킨 스킨경로/ <!--//일반 목록 시작 --> <li loop="$document_list=>$no,$document" class="select"|cond="$document_srl==$document->document_srl...
    Read More
  9. 11
    Oct 2022
    10:37

    방명록 형식 게시판에서 처음부터 댓글이 펼쳐지지 않도록 하기

    Sketchbook5 스킨 방병록 형식 게시판에서 처음 접근할 때 댓글을 접고 시작하도록 설정하기 _list_guest.html 파일의 103번째 줄에 style="display:none" 추가함. <!--// 댓글 --> <div class="guest_cmt fdb_v2 clear {$mi->profile_img} {$mi->fdb_hide}" s...
    Read More
  10. 08
    Oct 2022
    14:59

    방명록 스킨에서 댓글 "댓글 쓰기 권한이 없습니다." 조치 방법

    Sketchbook5 스킨의 방명록 스킨에서만 "댓글 쓰기 권한이 없습니다."라는 메시지가 나타나면서 댓글을 사용할 수 없는 경우 아래와 같이 조치함. //TODO guestbook, blog style supports legacy codes. if($this->module_info->skin == 'xe_guestbook' || $th...
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5