1

I have Simogeo FileManager version 2.0.0. I extracted it in root/tools, changed the config file, set up the permissions, hooked it to tinymce and everything seemed to work. The tinymce opens the popup window with FileManager. I can create a folder, change folder and upload files.

Problem is when I upload file(s) I cannot see them in the FileManager but they are uploaded in the directories I created. The only thing I can see are directories.

I am testing it on Windows 8.1 with uwAmp, PHP 5.3.24 or PHP 5.4.31.

Config file:

{
        "_comment": "IMPORTANT : go to the wiki page to know about options configuration https://github.com/simogeo/Filemanager/wiki/Filemanager-configuration-file",
    "options": {
        "culture": "en",
        "lang": "php",
        "theme": "flat-dark",
        "defaultViewMode": "grid",
        "autoload": true,
        "showFullPath": false,
        "showTitleAttr": false,
        "browseOnly": false,
        "showConfirmation": true,
        "showThumbs": true,
        "generateThumbnails": true,
        "searchBox": true,
        "listFiles": true,
        "fileSorting": "default",
        "chars_only_latin": true,
        "dateFormat": "d M Y H:i",
        "serverRoot": true,
        "fileRoot": false,
        "relPath": false,
        "logger": false,
        "capabilities": ["select", "download", "rename", "delete", "replace"],
        "plugins": []
    },
    "security": {
        "allowFolderDownload": false,
        "allowChangeExtensions": false,
        "allowNoExtension": false,
        "uploadPolicy": "DISALLOW_ALL",
        "uploadRestrictions": [
            "jpg",
            "jpeg",
            "gif",
            "png",
            "svg",
            "txt",
            "pdf",
            "odp",
            "ods",
            "odt",
            "rtf",
            "doc",
            "docx",
            "xls",
            "xlsx",
            "ppt",
            "pptx",
            "csv",
            "ogv",
            "mp4",
            "webm",
            "m4v",
            "ogg",
            "mp3",
            "wav",
            "zip",
            "rar"
        ]
    },
    "upload": {
        "multiple": true,
        "number": 5,
        "overwrite": false,
        "imagesOnly": false,
        "fileSizeLimit": 16
    },
    "exclude": {
        "unallowed_files": [
            ".htaccess",
            "web.config"
        ],
        "unallowed_dirs": [
            "_thumbs",
            ".CDN_ACCESS_LOGS",
            "cloudservers"
        ],
        "unallowed_files_REGEXP": "/^\\./",
        "unallowed_dirs_REGEXP": "/^\\./"
    },
    "images": {
        "imagesExt": [
            "jpg",
            "jpeg",
            "gif",
            "png",
            "svg"
        ],
        "resize": {
            "enabled":true,
            "maxWidth": 1280,
            "maxHeight": 1024
        }
    },
    "videos": {
        "showVideoPlayer": true,
        "videosExt": [
            "ogv",
            "mp4",
            "webm",
            "m4v"
        ],
        "videosPlayerWidth": 400,
        "videosPlayerHeight": 222
    },
    "audios": {
        "showAudioPlayer": true,
        "audiosExt": [
            "ogg",
            "mp3",
            "wav"
        ]
    },
    "edit": {
        "enabled": true,
        "lineNumbers": true,
        "lineWrapping": true,
        "codeHighlight": false,
        "theme": "elegant",
        "editExt": [
            "txt",
            "csv"
        ]
    },
    "customScrollbar": {
        "enabled": true,
        "theme": "inset-2-dark",
        "button": true
    },
    "extras": {
        "extra_js": [],
        "extra_js_async": true
    },
    "icons": {
        "path": "images/fileicons/",
        "directory": "_Open.png",
        "default": "default.png"
    },
    "url": "https://github.com/simogeo/Filemanager",
    "version": "2.0.0-dev"
}
tttpapi
  • 887
  • 2
  • 9
  • 32

2 Answers2

1

The problem was with the type in referer.

tinymce was passing ?type=image and filemanager expected ?type=images

tttpapi
  • 887
  • 2
  • 9
  • 32
  • Thanks for letting us know. To fix this, you can define your own callback function as follow : http://pastebin.com/mfeaSSFW. See also : http://www.tinymce.com/wiki.php/TinyMCE3x:How-to_implement_a_custom_file_browser and http://michaelbudd.org/tutorials/view/28/Building-custom-file-browser-for-TinyMCE-version-4 – simo Feb 06 '15 at 11:01
  • Yes, I used this code: `cmsURL = cmsURL + "&type=images";` – tttpapi Feb 06 '15 at 11:13
  • Is there another way how to paste the URL to tinymce from filemanager when I choose the image then copy the url and paste it manually? – tttpapi Feb 06 '15 at 11:15
0

Are you sure listFiles option is set to true inc config file ?

See the related doc : https://github.com/simogeo/Filemanager/wiki/Filemanager-configuration-file

listFiles Default value true. Display files in right column (filetree). If set to false, will display only folders. Can take value true or false.

For further help, could you copy-paste an URL or at least your config file!?

simo
  • 290
  • 8
  • 24
  • I posted the config file. And the listFiles is set to true. – tttpapi Feb 06 '15 at 09:53
  • Also strange is that when I open the URL that is called by AJAX I get array with the images and folders. But if I check the response from AJAX there is just empty array []. – tttpapi Feb 06 '15 at 10:00
  • That's strange indeed ... I would first give you the advice to download and try the [latest trunk version](https://github.com/simogeo/Filemanager/archive/master.zip). If you still experience the bug, you can have a look on apache errors logs, and [enable FM debug option](https://github.com/simogeo/Filemanager/wiki/Enable-log-debug-in-PHP-connector) to see if paths are corrects. By the way, if you want, you can just copy-paste the content of that thread and open a [new issue](https://github.com/simogeo/Filemanager/issues/new) on github. – simo Feb 06 '15 at 10:47