Giter Site home page Giter Site logo

psolom / richfilemanager Goto Github PK

View Code? Open in Web Editor NEW
893.0 69.0 246.0 14.38 MB

An open-source file manager. Up-to-date for PHP, Java, ASHX, ASP, NodeJs & Python 3 Flask. Contributions are welcome!

Home Page: http://fm.devale.pro

ASP 0.55% Java 9.95% PHP 2.01% C# 1.07% Python 0.25% HTML 22.19% Shell 0.01% JavaScript 58.19% CSS 5.47% Go 0.29% Smarty 0.01%
filemanager php-filemanager java-filemanager fileupload wysiwyg-integration wysiwyg-php ckeditor imperavi-redactor tinymce asp-filemanager

richfilemanager's Introduction

Rich Filemanager

Rich Filemanager is an open-source file manager released under MIT license. Based on the @simogeo Filemanager, with a lot of improvements and new features:

  • Drag-and-drop support
  • Clipboard feature: copy, cut, paste, clear
  • Selectable files & folders support (mouse dragging & Ctrl key)
  • Multiple actions support for selected files & folders: move, delete, download
  • Before and After callback functions for some actions
  • Double or single click setup to open files & folders
  • Lazy loading of images thumbnails
  • Integration with AWS S3 storage
  • Integration with Imperavi Redactor WYSIWYG editor
  • Multiple & chunked uploads support - based on jQuery-File-Upload
  • New design of multiple upload window; New upload controls for each previewed file (start, abort, resume, delete, etc.)
  • Filetree: allow to open and display multiple subfolders at a time
  • Online MS Office documents viewer - based on Google Docs Viewer
  • Extended list of previewed file types via ViewerJS
  • New viewers to preview: "html" files (iframe), "md" files (markdown-it), etc.
  • CodeMirror editor now compatible with most of viewers
  • Standardized API that follows JSON API best practices to create connectors for any server-side language
  • Independent client and server sides. Can be located on different servers.
  • Independent configuration files for client and server sides.
  • Client-side configuration options may be overwritten with server-side ones using PHP connector.
  • Implemented plugins system for PHP connector (server-based)
  • Added new "Type" column in the list view
  • Added ability to limit max size of the storage (root folder)
  • Implemented natural sorting on the client-side

To see the full list check out changelog file.

Demo

Filemanager live example: http://fm.devale.pro

Compatibility

Filemanager is designed to interact with a number of programming languages via connectors. The actual connectors are: PHP, Java, ASHX, ASP, NodeJs & Python 3 Flask. You are still able you to download unsupported v0.8 from archive (CFM, lasso, PL, JSP and Python WSGI)

Browser compatibility:

  • IE9+
  • Chrome
  • FireFox
  • Opera

Installation and Setup

Documentation

Filemanager is highly documented on the wiki pages. API, see below.

Main features

  • Available in more than 20 languages.
  • Highly customizable
  • Can work as standalone application
  • Easy integration with WYSIWYG editors like CKEditor, TinyMCE, Imperavi Redactor and so on.
  • Easy integration with AWS S3 storage to manipulate your files on remote S3 server.
  • Easy integration with colorbox jquery plugin or HTML simple textfield
  • 2 view modes: grid and list
  • Drag-and-drop support
  • Clipboard feature: copy, cut, paste, clear
  • Single file actions: upload, modify, move, delete, download
  • Single folder actions: create, modify, move, delete, download (zip archive)
  • Selectable support for files & folders (mouse dragging & Ctrl key)
  • Multiple actions support for selected files & folders: move, delete, download
  • Support user permissions - based on session
  • Handle system permissions
  • Ability to pass config user file in URL
  • Multiple & chunked uploads support - based on jQuery-File-Upload
  • Online text / code edition - based on codeMirror
  • Online PDF & OpenOffice documents viewer - based on viewerJS
  • Online MS Office documents viewer - based on Google Docs Viewer
  • Several server-side language connectors available. PHP, Java, ASHX, ASP, NodeJs & Python 3 Flask up-to-date
  • Standardized API that follows JSON API best practices to create connectors for any server-side language
  • Independent client and server sides. Can be located on different servers.
  • Opening a given folder
  • Opening exclusively a given folder
  • Passing parameters to the FM
  • File types and patterns restrictions
  • Video and audio player relying on web browser capabilities
  • Textbox Search filter
  • Thumbnails generation
  • Image auto-resize
  • File size limit
  • File exclusion based on name and patterns
  • Prevent files overwriting (or not)
  • Copy direct file URL
  • CSS Themes - Please, share your themes with others !
  • and more ...

Screenshot

Filemanager Screenshot

Contribution

Any contribution is greatly appreciated. You can become a maintainer for any of existent connectors, or create new one for your server side language. Check the details in API section.

MIT LICENSE

Released under the MIT license.

richfilemanager's People

Contributors

arius28 avatar christianschmidt1981 avatar claudep avatar dereks avatar dereks-igor avatar dtricky avatar fabriceci avatar fillmorejd avatar hammond13 avatar ihab-mardoud avatar intoccabil avatar jasonhuck avatar jlaustill avatar jnvsor avatar liferealized avatar mahmoud-eskandari avatar michalmrzyk avatar mickeyze avatar moacirosa avatar mystralkk avatar psolom avatar richeflits avatar robyer avatar salimsalici avatar shortbusking avatar simogeo avatar stefanogualdi avatar ttimebe avatar zapik avatar zeroasterisk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

richfilemanager's Issues

User persmission

Hi-, as a (french ;-)) newbie, is it possible to tell me how to configure user/password permission with richfilemanager because I don't understand the section with auth() !!

Tks

Failed to upload any files

When I upload a simple TXT file (very small), it failed, shows:

20160614162533

However, even if I hover my mouse on it, no information shows, only a red, blank diaglog.

The backend PHP log shows as:

[14-Jun-2016 16:19:17] PHP Fatal error:  Call to undefined function transliterator_transliterate() in /var/www/html/private/RichFilemanager/connectors/php/LocalFilemanager.php on line 1000
[14-Jun-2016 16:19:17] PHP Stack trace:
[14-Jun-2016 16:19:17] PHP   1. {main}() /var/www/html/private/RichFilemanager/connectors/php/filemanager.php:0
[14-Jun-2016 16:19:17] PHP   2. BaseFilemanager->handleRequest() /var/www/html/private/RichFilemanager/connectors/php/filemanager.php:32
[14-Jun-2016 16:19:17] PHP   3. LocalFilemanager->add() /var/www/html/private/RichFilemanager/connectors/php/BaseFilemanager.php:291
[14-Jun-2016 16:19:17] PHP   4. BaseUploadHandler->post() /var/www/html/private/RichFilemanager/connectors/php/LocalFilemanager.php:206
[14-Jun-2016 16:19:17] PHP   5. BaseUploadHandler->handle_file_upload() /var/www/html/private/RichFilemanager/connectors/php/BaseUploadHandler.php:1431
[14-Jun-2016 16:19:17] PHP   6. BaseUploadHandler->get_file_name() /var/www/html/private/RichFilemanager/connectors/php/BaseUploadHandler.php:1094
[14-Jun-2016 16:19:17] PHP   7. LocalUploadHandler->trim_file_name() /var/www/html/private/RichFilemanager/connectors/php/BaseUploadHandler.php:531
[14-Jun-2016 16:19:17] PHP   8. LocalFilemanager->normalizeString() /var/www/html/private/RichFilemanager/connectors/php/LocalUploadHandler.php:83

set param browseOnly

is there any chance to edit parameters in filemanager.config.json in php through the object $fm

regards

Copy URL and selectItem

@servocoder : for your information ! Could be useful also for RFM

simogeo/Filemanager@809b3b2

regarding Copy Url to clipboard, I think providing a full URL is a must ...
regarding selectItem it could be an option ? what do you think ?

File edit codeHighlight doesn't work

Steps to reproduce:

  1. enable config.edit.codeHighlight in config
  2. add "html" to config.edit.editExt
  3. Try to edit any HTML file
    Error message: ReferenceError: loadJS is not defined

The recommend file icons size

Some useful file types (such as iso) miss their icons in images/fileicons. I want to know the recommend file icons size (px). Then I would add some icons (and also make pull request)

symbolic link for userfiles

i've been using a symbolic link for my userfiles directory that points to another part of my server.
it worked fine as the root but symbolic links inside the userfiles did not work.

my problem is that i want to use a mounted drive for storage on my server, but the symbolic link to this drive breaks the file manager. i get the "the file / does not exist" error.

any ideas?

New design CSS

@servocoder I started today to code a new theme for the manager. I would like to have your opinion on in few points and your help on few modifications. Maybe it will be simpler to discuss a day into an online chat (or here if you prefer)?

After accessMediasFolder can be accessible but showing only loading images in Filemanager

I'm fresh new in bestmomo/Filemanager.1.1 in Laravel5.3.20 after install everthing work fine ever create and upload any images of folders. But I can't see any items in that bestmomo/filemanager dialog box.
I used as below configure

<script> CKEDITOR.replace( 'textarea', { filebrowserBrowseUrl: '{!! url('filemanager/index.html') !!}', ImageBrowser : true, autoUpdateElement:true, //language:'km', ``` }); </script>

Assess url 

GET http://shop.dev/filemanager/scripts/filemanager.config.js.default?_=1477550701623

200 OK
        1ms 
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/filemanager.config.js?_=1477550701624

200 OK
        1ms 
jquery-....min.js (line 5)
HEAD http://shop.dev/filemanager/scripts/languages/en.js

304 Not Modified
        2ms 
fileman....min.js (line 7)
GET http://shop.dev/filemanager/scripts/languages/en.js

200 OK
        1ms 
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/themes/flat-dark/styles/ie.css

304 Not Modified
        15ms  
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/zeroclipboard/dist/ZeroClipboard.js?_=1477550701625

200 OK
        1ms 
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/CodeMirror/lib/codemirror.js?_=1477550701626

200 OK
        13ms  
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/CodeMirror/addon/selection/active-line.js?_=1477550701627

200 OK
        1ms 
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/CodeMirror/addon/display/fullscreen.js?_=1477550701628

200 OK
        10ms  
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/CodeMirror/dynamic-mode.js?_=1477550701629

200 OK
        1ms 
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/filemanager.liveSearch.min.js?_=1477550701630

200 OK
        1ms 
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/dropzone/downloads/dropzone.js?_=1477550701631

200 OK
        10ms  
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/scripts/custom-scroll...y.mCustomScrollbar.concat.min.js?_=1477550701632

200 OK
        1ms 
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/connectors/php/filema...config.js&mode=getfolder&showThumbs=true&time=88

200 OK
        241ms  
jquery-....min.js (line 5)
GET http://shop.dev/filemanager/connectors/php/filema...onfig.js&mode=getfolder&showThumbs=true&time=189

200 OK
        234ms

**Result**

{"\/ice_screenshot_20160727-141539.png":{"Path":"\/ice_screenshot_20160727-141539.png","Filename":"ice_screenshot_20160727-141539.png","File Type":"png","Protected":0,"Preview":"connectors\/php\/filemanager.php?mode=preview&path=%2Fice_screenshot_20160727-141539.png&1477550702&thumbnail=true","Properties":{"Date Created":null,"Date Modified":"27 Oct 2016 05:31","Height":467,"Width":1117,"Size":36146,"filemtime":1477546271},"Error":"","Code":0},"\/Till_repayment.PNG":{"Path":"\/Till_repayment.PNG","Filename":"Till_repayment.PNG","File Type":"PNG","Protected":0,"Preview":"connectors\/php\/filemanager.php?mode=preview&path=%2FTill_repayment.PNG&1477550702&thumbnail=true","Properties":{"Date Created":null,"Date Modified":"27 Oct 2016 06:42","Height":558,"Width":897,"Size":14893,"filemtime":1477550567},"Error":"","Code":0},"\/ddddd\/":{"Path":"\/ddddd\/","Filename":"ddddd","File Type":"dir","Protected":0,"Preview":"images\/fileicons\/_Open.png","Properties":{"Date Created":"27 Oct 2016 05:36","Date Modified":"27 Oct 2016 05:36","filemtime":1477546608,"Height":null,"Width":null,"Size":null},"Error":"","Code":0},"\/My_folder\/":{"Path":"\/My_folder\/","Filename":"My_folder","File Type":"dir","Protected":0,"Preview":"images\/fileicons\/_Open.png","Properties":{"Date Created":"27 Oct 2016 05:32","Date Modified":"27 Oct 2016 05:32","filemtime":1477546324,"Height":null,"Width":null,"Size":null},"Error":"","Code":0},"\/sdfasdf\/":{"Path":"\/sdfasdf\/","Filename":"sdfasdf","File Type":"dir","Protected":0,"Preview":"images\/fileicons\/_Open.png","Properties":{"Date Created":"27 Oct 2016 05:34","Date Modified":"27 Oct 2016 05:34","filemtime":1477546469,"Height":null,"Width":null,"Size":null},"Error":"","Code":0}}
![as](https://cloud.githubusercontent.com/assets/812528/19757529/8af08398-9c4d-11e6-87cd-b2b23855b921.jpg)

Rename

Me again. The rename function has a bug. When you rename a file, using php connector it does it well, but sadly it is called the connector twice, so the message on site is shown that the file dose not exist. If you refresh the page, the file will be show with the new name.
So the error is that it shows a message, that the file dose not exists instead of showing a succesfull message.

Naming concept

Hy.
I have a question/suggestion.
Why the filemanager not allows to use names like: my-image.jpg?
It creates a myimage.jpg
Thanks.

Directory's pulling wrong icon

The code is checking for a file extension, and then using that + '.png' for the icon. Directories don't have an extension, so it's trying to pull .png, which doesn't exist. Changing line 554 to

var fileType = data["File Type"] === "dir" ? "_Open" : getExtension(data['Path']);

Fixes it for me, but I'm not sure that hard coding the _Open is the proper solution.

Release 1.1 roadmap

I'm going to update this list with requested feature for 1.1 later.

Here the list of thing which is done and available at dev branch:

  • js file reworked to become a plugin
  • some ajax async calls replaced with deferred chains (based on #21)
  • new Java connector (#21)
  • new nice notifications, based on alertify plugin on my fork (#25)
  • theme concept was reworked, base assets created, no need to duplicate all assets for new theme
  • started with demo page with examples for different usage cases
  • many changes in html templates to make thing more organaized
  • upload popup dialog now scrollable

error

I downloaded, copied filemanager.config.json but server has been showing this error
Uncaught TypeError: Cannot read property 'data' of undefined

on return of the below function

   Qa = function(b) {
        if (!m[b] || Date.now() - m[b].cached > 2e3) {
            var c = {
                mode: "getfolder",
                path: b,
                showThumbs: f.options.showThumbs
            };
            a.urlParam("type") && (c.type = a.urlParam("type")), a.ajax({
                async: !1,
                url: Y(c),
                dataType: "json",
                cache: !1,
                success: function(a) {
                    m[b] = {
                        cached: Date.now(),
                        data: a
                    }
                },
                error: I
            })
        }
        return m[b].data
    },

download files issue

The problem is when trying to download single file we are getting files with 0 bytes.
Looking into code we found
In php connector LocalFilemanager.php line 852
actionDownload() method
...

$chunk_size = 16 * 1024 * 1024;
// read file by chunks to handle large files

        if ($chunk_size && $file_size > $chunk_size) {
            $handle = fopen($target_fullpath, 'rb');
            while (!feof($handle)) {
                echo fread($handle, $chunk_size);
                @ob_flush();
                @flush();
            }
            fclose($handle);
        } 

No else? I can't see where and how files with size <16Gb are output.
I added

else {
$handle = fopen($target_fullpath, 'rb');
echo fread($handle, $file_size);
@ob_flush();
@flush();

            fclose($handle);
        }

and now download single file works...

enhancement : don't block the ui when an operation is succeed

When you successfully do something (delete a file, add a file) there is a success message box that blocks the ui and force to click on the OK button (and just after the fm refresh the ui).

It will be better to have instead an instant refresh and a notification that disappears automatically after x seconds without blocking anything. (something like that).

How to get clean link when using CKeditor

I am using CKeditor connected with Rich filemanager. I encountered problem when using link plugin in CKeditor. When I Click Browse server in link dialog box, Filemanager opens up, I choose a file that I want and then I get long, strange link. Let say I want to have link to Test.php - I would like to have absolute or relative path to it but instead I get this:
http://test/NoNameCMS/CMS/Filemanager/connectors/php/filemanager.php?mode=readfile&amp;path=%2FDATABASE%2FPAGES%2FTest.php&amp;config=filemanager.config.json&amp;time=1476432420298
This link does not render my PHP file.

more feature req for rf

i want developer have a plan for implementing more features to RichFM

  • easy drag and drop for moving file
  • multiple selection for bulk action
  • enable create a new file ie txt file
  • zip unzip features
  • more user friendly and modern ui
  • better preview for document file ie doc, docx, pdf, i have issue with doc file where no preview available.

last
how can i support for epub file and enable preview available.

thank

Client and Server parts separation. Better API support.

Hello there.
Thanks to the explanations and ideas of @jlaustill and other contributors. I have made a number of modifications at the client side and PHP connector (API description will be adapted as well). The changes came from the point that FM client-side should be separated from server-side (connector) as much as possible. The lower conjuction the better. All developers and maintainers must follow this way while working on their connectors. The list of changes you can see below.

  • server part is separated from client part to a greater extent;
  • removed fileConnector option from server-side;
  • removed 'Preview' and 'Thumbnail' params from getinfo response;
  • all preview paths (images, media, office files) are now associated to connector. Absolute paths for icons exclusively;
  • all preview paths are now built at the client-side (connector-independent) for better API support;
  • added support of seeking for media files in PHP connector (including S3 storage plugin);
  • PHP connector refactored, following OOP practices;
  • added icons for OpenOffice files;

One minor thing I also want to change is to rename fileConnector to apiConnector option in config file, or something like that. The name should better reflect the meaning. Currently it's hard to understand what fileConnector is intended for from its title. Please, share your suggestion, if you have the other one for this option.

Also I suppose normalizePath function could be removed from JS file because now connector should return relative path solely. But before do this I want to hear @gmkll, @fabriceci opinions on this, because normalizePath was implemented initially for Java connector needs.

@gmkll, @fabriceci, @jlaustill
Be aware of these modifications and welcome to discussion.

@gmkll, please update your PR to the last changes and will merge it.

Question related to the preview/path and possible improvements

Hi, I am writing a connector for java (spring MVC). I tried the JSP connector in the repo but it's not working. (I discovered later the C5 connector but I have not tried).

To create the connector, I watched the Ajax call and response, to try to understand.

My app doesn’t serve the files directly to the client, I have 2 path :

  • one private (only accessible by the server), used to display file in the manager => « Path »
  • one public (to access to the file), used to browse the file => « Preview »

(When you try to listen a song or watch a doc the manager use the preview path (and thumbnail for images), so I think it’s the good behaviour, I am right?

The response look like this

{  
...
"Path":"/my_folder/fichier.txt",
"Preview" : "/../../../fileController?file=public/my_folder/fichier.txt", 
...
}

The connector work well but I have 2 behaviour I would like to change (but maybe i miss something):

  1. When I select a file (editor) or copy URL to clipboard I have the (server) path, and I would like the preview.

Do you agree if I add a pull request to add a boolean in the config file to choose that something like "usePreviewForSelectionAndCopy = false" ?

  1. For the preview, the manager add automatically the path of the file manager directory ( that’s why I was forced to begin the preview path with "/../../.."). I think the issue related to the clipboard is maybe linked to this choice.

Same, do you agree if I add pull request to add a boolean in the config to choose if the preview path should be relative to the manager or absolute: something like « absoluteUrlForPreview = false »?

File permission problem

I placed the RichFilemanager/ directory in /var/www/html/private/, when I visit on the browser by: http://192.168.7.20/private/RichFilemanager/, it says:
The file /private/RichFilemanager/ does not exist

The log /tmp/filemanager.log says:

[12/06/2016 12:50:45]#192.168.7.20#BaseFilemanager::enableLog - Log enabled (in /tmp/filemanager.log file)
[12/06/2016 12:50:45]#192.168.7.20#LocalFilemanager::__construct $this->fm_path value /var/www/html/private/RichFilemanager
[12/06/2016 12:50:45]#192.168.7.20#LocalFilemanager::__construct $this->path_to_files /var/www/html/private/RichFilemanager/userfiles
[12/06/2016 12:50:45]#192.168.7.20#LocalFilemanager::__construct $this->doc_root value /var/www/html
[12/06/2016 12:50:45]#192.168.7.20#LocalFilemanager::__construct $this->dynamic_fileroot value userfiles
[12/06/2016 12:50:45]#192.168.7.20#BaseFilemanager::error - error message : The file /private/RichFilemanager/ does not exist.

I'm sure /var/www/html/private/RichFilemanager/userfiles exist, and was set to group "apache".

Can't open rootFolder

Hi! I Get Server error when I set in filemanager.config.json
"serverRoot": true,
"fileRoot": "MyFolder/",
MyFolder is located in domain.com/MyFolder.
Filemanager si located in domain.com/MyFolder/NewFolder/filemanager/index.html

Split configuration file into two: server and client config files

Here the original message from @jlaustill
I have examinated the json config file and found that many of options are client-side or server-side related solely. Of course, it's convenient to keep all configuration in one place and all of the options are utilized in FM + PHP connector. But let's consider few options:

  1. it's an ordinary situation when some connector may not implement all of server-side options which are implemented in PHP connector for some reason. It may bring a confusion for user, because he expects that all listed options affect FM.

  2. as noted @jlaustill: As it is, with the api and ui on seperate servers, it looks like I'll have to do an ajax request back to origin to grab the config file for every single request. This isn't great, it opens up to spoofing attacks.

  3. PHP connector entry script allows to pass extra config options to the constructor in order to override options from json config. It's convenient, but leads to another confusion, because it will work for server-side options only. The client-side have been already initiated with options from the config file at this point.

Here is the server-side config file for PHP connector. It's easy for me to move server-ralated options to this file. On the other hand there are some options in config file which are used in both sides. For instance options.lang, options.capabilities, some of security, upload, images sections, etc.

So we will get some options duplicated in both configuration files. It's more difficult to manage, but also more secure and less confusing (see p.2 and p.3), user can be sure that an option will take effect if he changes it. I believe it's the better option.

@jlaustill, @gmkll, @fabriceci, @simogeo
Looking forward to your notes.

XMLHttpRequest cannot load

This was working on localhost. Now i want to publish the site, and i really need the file manager, but i am getting the following error:

jquery-1.11.3.min.js:5 XMLHttpRequest cannot load http://www.site.com/framework//assets/filemanager/scripts/filemanager.config.default.json?_=1469301847633. 

Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers in preflight response.send
 @ jquery-1.11.3.min.js:5ajax 
@ jquery-1.11.3.min.js:5loadConfigFile 
@ filemanager.js:52(anonymous function) 
@ filemanager.js:70(anonymous function)
 @ filemanager.js:2856

filemanager.js:63 Uncaught TypeError: Cannot set property 'globals' of nullloadConfigFile
 @ filemanager.js:63(anonymous function) 
@ filemanager.js:70(anonymous function) 
@ filemanager.js:2856

expanded folder and dynamic user folder path

When I set a folderPath in the filemanager.php it seems that calling the index.html with ?expandedFolder=2016/ is being ignored.

It must be something stupid, but I can't find a way to first set a specific folder as root and then open a subfolder within.

nodejs connector

I just looked over the code base, and I realized this is going to be a LOT tougher than I expected. The code expects the connector to be on the web server, and not an api server. My environment is separating the api from the web server. So my question is, are you willing to work with these changes to set an api url instead of a connector path? It requires setting credentials and cors on the ajax calls as well.

I would solve this by factoring all the ajax calls into functions that emulate jqueries $.get, $.put, etc., and either calling the connector, or the api endpoint based upon the configuration. I would be willing to do this, but I wanted to check and see if anyone had issues with it?

Path implementation

I was using the old version of the file Manager and I found this repo. I want to update my files to this, but i have a problem.
My folder system is like the following:

admin/
index.php
/assets/ filemanager.js etc.
/components/ filemanager.php
/userfiles/ - the userfiles folder

and always shows thath the path is invalid. how to resolve this problem?

Tiny MCE file path problem

When inserting an existing image (or uploading a new one), the file path of the image is being generated in the following way:
< img src="../includes/tinymce_4.4.3/plugins/richfilemanager/connectors/php/filemanager.php?mode=readfile&amp;path=%2Fsandbox_slideshow_02.jpg&amp;config=filemanager.config.json&amp;time=1476077065470" alt="" width="1200" height="450" / >

Is there something in the config.json file I need to change or is there something on the Tiny MCE init I need to change. Here's what I have for the Tiny MCE init:
`tinymce.init({
selector: "textarea",
theme: "modern",
width: 680,
height: 300,
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
"table contextmenu directionality emoticons paste textcolor code"
],
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
toolbar2: "| link unlink anchor | image media | forecolor backcolor | print preview code ",
image_advtab: true ,

file_browser_callback : function(field_name, url, type, win) {

        // from http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript
        var w = window,
        d = document,
        e = d.documentElement,
        g = d.getElementsByTagName('body')[0],
        x = w.innerWidth || e.clientWidth || g.clientWidth,
        y = w.innerHeight|| e.clientHeight|| g.clientHeight;

    var cmsURL = 'http://mydomain.com/includes/tinymce_4.4.3/plugins/richfilemanager/index.html?&field_name='+field_name+'&langCode='+tinymce.settings.language;

    if(type == 'image') {           
        cmsURL = cmsURL + "&type=images";
    }

    tinyMCE.activeEditor.windowManager.open({
        file : cmsURL,
        title : 'Filemanager',
        width : x * 0.8,
        height : y * 0.8,
        resizable : "yes",
        close_previous : "no"
    });         

}

});`

I don't think I'm supposed to change anything in the connectors/php/config.php file, but you tell me....

Failed to upload files named by pure non-latin chars

Using the lastest master version, upload files named by latin chars is totally OK. However upload files named by pure non-latin chars failed.

In configure file, "charsLatinOnly" has been set to "false"

When I upload a file called 测试文件.txt , it shows:

aa
20160615092018

When I upload a file called a测试文件.txt (begin with latin chars, end with non-latin chars), it is OK.
When I upload a file called 测试文件a.txt (begin with non-latin chars, end with latin chars), it is also OK, however non-latin chars would be deleted. Therefore the result name is only a.txt.

Multiple file upload and selection

Need multiple file upload system and also multiple file selection facilities. I have faced a problem when I am making a gallery application using this file manager because I had to upload 1file and select one. This is a really bad idea for upload a lot of images in a gallery album. It will be very useful if it has multiple file upload & selection system.

Fatal error: Allowed memory size of 134217728 bytes exhausted

I have a file of ~500MB already on my server. When I try to download it through RichFilemanager, it calls:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 575025152 bytes) in /var/www/html/RichFilemanager/connectors/php/LocalFilemanager.php on line 683

Well, my memory_limit of php is 128MB. Should I just need to increase it?

Server Error

Hi, I am attempting to start the development of a python connector for this project however I cannot seem to start the project with a PHP server. I am receiving the following errors in my browser:
screen shot 2016-09-08 at 10 14 35
screen shot 2016-09-08 at 10 14 57

When I load the page I initially get this GUI error also:
screen shot 2016-09-08 at 10 15 16

I am starting the simple server with the following terminal command although no errors appear in the terminal, just in the browser:
screen shot 2016-09-08 at 10 15 36

Any help would be much appreciated, thank you!

Dev Branch - fm.js, readIcons function requires DIRECTORYINDEX on Webserver

In function readIcons in fileManager.js in branch dev/v1.0.6 the ajax requires directory read mode on the server side (DocumentIndex with Apache Webserver) as I understand it - which normally could not be expected and was not used/required in in v1.0.4 (BTW config.icons.path + '/' has by default a double slash at the end).

I would suggest a) remove it (i.e. just expect it) b) make it optional c) if the request fails with 404 then set a reasonable default.

I understand the intended flexibility, but why not use some already configured file extension list, e.g.
security.uploadRestrictions as "expected with fileType + '.png'
and assign it immediately in fm.js using e.g. the map function like
fileIcons = security.uploadRestrictions.map(function(x) { x+ ".png" }).

Log default is Windows-only.

The default logging path, defined in the Logger class on line 21 is "C:/filemanager.log", which causes everything to explode on non-Windows servers, even if Logging is disabled in the config.

Rename directory error

When trying to rename a Directory it is giving the following error.

File type is not allowed.
Only following files are allowed: jpg, jpe, jpeg, gif, png, svg, txt, pdf, odp, ods, odt, rtf, doc, docx, xls, xlsx, ppt, pptx, csv, ogv, avi, mkv, mp4, webm, m4v, ogg, mp3, wav, zip, rar.

Feature request: roles management (multi-profile)

I think it will be nice to have a simple roles management.

Suggestion:

We can add a new constructor with an array of roles as extra parameters. By default, if nothing is provided (actual case) a user has all roles.

When the file manager start, it does an extra request to get the user roles to the connector. (It does not seem too hard to implement because the logic is already implemented with the "has_capability" functions.)

This will real plus in a CMS usage or when you have different profiles of users that use the file manager in your app.

File Manager is loading infinte

I can't load a filemanger because of filemanager is loading infinite.
I used code from filemanager.config.default.json.
Everythings is smooth and working in localhost running, but those error is coming after I uploaded to my Cpanel Webhosting server. I copied all file under the public folder to public_html and www folder.
But Still got an error.
Please help me solve this problem.
error1

API Wiki update

I don't have update permissions on the wiki, so here's what I added this morning, you can review and post to your liking :)
API.zip

download error

When I try to download a file called a.txt, the backend PHP shows error as:

[15-Jun-2016 09:17:49] PHP Warning:  mime_content_type(a.txt) [<a href='function.mime-content-type'>function.mime-content-type</a>]: failed to open stream: No such file or directory in /var/www/html/private/RichFilemanager/connectors/php/LocalFilemanager.php on line 674
[15-Jun-2016 09:17:49] PHP Stack trace:
[15-Jun-2016 09:17:49] PHP   1. {main}() /var/www/html/private/RichFilemanager/connectors/php/filemanager.php:0
[15-Jun-2016 09:17:49] PHP   2. BaseFilemanager->handleRequest() /var/www/html/private/RichFilemanager/connectors/php/filemanager.php:32
[15-Jun-2016 09:17:49] PHP   3. LocalFilemanager->download() /var/www/html/private/RichFilemanager/connectors/php/BaseFilemanager.php:259
[15-Jun-2016 09:17:49] PHP   4. mime_content_type() /var/www/html/private/RichFilemanager/connectors/php/LocalFilemanager.php:674

The downloaded file is also a error file like above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.