misterunknown / ifm Goto Github PK
View Code? Open in Web Editor NEWImproved File Manager
License: MIT License
Improved File Manager
License: MIT License
Meanwhile plain javascript is almost as elegant and comfortable as jquery, while it is even faster. So I decided to remove unnecessary use of jquery.
Hi,
Thanks for your lovely script.It will be a lot good if you add a new feature so that along with selecting multiple files with buttons (arrow up,arrow down) and using space to select ,it would be better that we can also select multiple files by pressing cntrl and selecting with mouse arrow .Plus,after selecting multiple files we can Right Click with mouse and a delete option should prompt something like this image:
For the demo posix_getpwuid has to be optional. Show user ids instead.
Ok, this is minor and you've been super amazing about working on features so I figured I'd throw it out there.
It would be great if there was an option to soft wrap in the editor. Maybe at window width or maybe at some column width. Not sure how easy this kind of thing is to do.
Thanks again!
At the moment, when the auth_source
ist set to file, the file has to have a special format, which no one knows. It should be treated like a usual htpasswd file.
Possibility to upload more than one file.
Either use file input multiple (and do not support a direct file rename then), or use a library like dropzone.js
I am not thinking of uploading whole directories, but the possibility to either drag and drop selected files onto the file upload (or dropzone.js area), or being able to use multi selection in the browser file input selection dialog.
After upload to webserver (Apache) i try to open the ifm.php. Result is blank page, firebug show error 500 or on my local xamp server with full debuging on: "General error occured: No or broken response".
There should be an option to create tar resp. zip archives.
The compiler should be able to include only one language.
The ace editor allows to set some behavioural options like softtabs, tab width, etc. These should be changeable.
The login form still lives in the PHP code. This is ugly and should be fixed.
When creating new files or directory, it is good that slashes already checked, like here:
https://github.com/misterunknown/ifm/blob/master/src/main.php#L368
Just one example, as this is tested all around the code.
I did a bit of a research, and found out that not all servers allow all kind of characters, e.g. all kind of unicode character should be prohibited to be uses.
This could be solved with following preg_match:
if (preg_match('/^[a-zA-Z0-9 ._-]*$/', $dn) !== 1) {
echo json_encode( array( "status" => "ERROR", "message" => "Allowed characters in directory names: a-zA-Z0-9 ._-" ) );
}
The regex a-zA-Z0-9 ._- fits quite good I think, maybe this should be made configureable.
The login form should live in the js part, which is necessary, when it runs in inline mode.
IFM Login
Login failed.
"auth" => 1,
"auth_source" => 'inline;admin:$apr1$1QQLMQXM$d2pEYgh7aFai7aOpyvXm71',
The folder tree for the copy/move dialog should be lazy loaded to prevent long wait times when having a huge directory tree.
When clicking on a folder in the list the folder's contents are not shown. Instead, when clicking e.g. a folder "System" the URL changes to http://#ystem and the textbox at the top shows "ystem" too. This looks like the first character is stripped off.
Hardlinks and symbolic links to folders are not handled correctly and are shown as if they were files.
Trying to open / edit a file results in a 404 error (when clicking on the name) or the error "This file can not be displayed or edited." (when using the "edit" button). The Download button works.
PHP 7.0 on Windows NT 10.0 AMD64
IFM 2.4.1 from https://github.com/misterunknown/ifm/archive/v2.4.1.zip (internal VERSION constant says 2.4.0, though)
General error occured: No or broken response
when change root_dir
PHP Warning: chdir(): No such file or directory (errno 2) in /home/xxxxx/public_html/xx/x/ifm.php on line 3833
how to disable create error_log file / change error_log file path
It would be nice, if you could search for files and directories.
Password protect file?
The ifm should be able to be managed simply using the keyboard.
ifm is pretty useful from a web browser but it doesn't do much from the phone. It would be awesome if it were responsive
Please add user classes. such as admin/user/guest so that only trusted users can do things like set permissions, delete, etc...
I'm running ifm from a dockerized Apache+PHP serving data from a shared webroot -- ie. the php side isn't always able to determine the file owner and group even if the function is available.
In this case, the resulting table layout is broken.
Currently everything is compiled into a single php file, which is nice due to its simplicity, but also brings some disadvantages. One of them is that the configuration is embedded in that file too and has to be manually merged each time the ifm.php script is updated. This isn't a real issue when using tools like BeyondCompare, but it would be easier if there would be the possibility to put the configuration into an external configuration file. I'd suggest to make this optional, e.g. so that an external configuration file overrides the predefined configuration in the script, in case such a file exists. The best option would be to require no modifications of the ifm.php at all, but I don't know whether that is possible without creating security issues (e.g. if the configuration file name is fixed and such a file could be edited/created via the web UI).
When hitting the backspace key, one expects to go a level higher. This does not happen atm.
Enable the user to change the GUI configuration, such like showowner
, showgroup
, contextmenu
etc. The values could be stored in a cookie or even in sessionStorage
or localStorage
I would love to implement lightweight font icons to reduce the file size a bit more of the script (to hopefully be able to run it on GoDaddy) and also display sharp, vector-based icons. I know it's not possible to embed the actual font icons into a single script, but you are able to simply load an external CDN like the Font Awesome library. I'm not a huge fan of FA, but it would provide a quick and easy external solution without having to embed anything. Plus, they're about to release v5 of their collection, so there should be plenty of new icons to work with. I know a lot of changes would be necessary due to all of the icons and buttons currently being made up of IMG elements, but I think it would benefit the script.
What do you think?
Line 1760 and line 1772 should have isset($_SESSION['auth']) statements
It would be fantastic if there was a way to define a single upload directory for (restricted user's) upload permissions.
A javascript template engine should be used to separate business logic and markup. This makes the code more readable and is a first step to provide custom themes.
for the zip function, currently a subdirectory is used as a tmp folder. It would be great if there was a way to over-ride this to make a subdirectory in a user defined global tmp directory instead.
I'm sure I probably did something wrong, but I uploaded a suggested update to the interface if you were interested:
This was mentioned here by @Concept211.
If we can specify a folder as the init directory of the file management shows instead of the folder ifm.php located. Because sometimes we calls the ifm.php class file as a third party library in the application system.
Suggested file types:
Hi. First off, thanks for the lovely script. It's a great help. I'd like to know how I'd go around building the source into a single file. I want to upgrade the CSS to Bootstrap 4 but it keeps breaking the Javascript when I do it in the main file. (zip/delete/etc., don't work).
.
Most of it went missing and the elements have to be changed to adapt to BS4.
Symlinks show up as regular folders, but when clicked on there is no follow.
note: apache has been set up to allow symlink following
Hi,
First of all thanks for your powerful script it has all the beautiful tools for using.But i am facing a little problem when i set root_dir to a a folder that is present in the script's directory ,it shows the files perfectly but i am not be able to delete,copy,move,rename etc. the files in that folder .it gives this error "Error: No valid working directory".i don't want to show my whole script to the users but only the files which are present in a folder in script's directory.
I would like to add multi language support in my fork and create a pull request.
I guess the mustache.js lib will help in creating multi language support.
In order to be able to perform the language change, it would be great to have following icons (or sort of) available in the custom icon set (not only for language change, but also for editor options):
http://fontawesome.io/icon/cog/
http://fontawesome.io/icon/sliders/
http://fontawesome.io/icon/wrench/
http://fontawesome.io/icon/globe/
http://fontawesome.io/icon/language/
It would be great to have the ability to upload a .ZIP file and have IFM extract the contents to path of where it was uploaded to. Even better would be the option to ZIP up an entire directory or full root.
Thank you for your hard work on this amazing project!
Currently ifm can only work with content which is on the same directory level - or in sub directories. It would be great to have a setting which allows me to navigate to parent folders as well. Thanks/Danke.
First of all, let me say that I don't want to sound ungrateful for the work you've done and shared. I am using it (though any web file manager is not my main interface to my files) and it has been great.
But anyway, it would be great if there was a change to the URL on navigating folders, etc. This way, I may (a) directly link back and (b) have a responsive back button that behaves has one would expect.
For example, see simple-file-manager
Thanks!
When I click any of the subdir icons in the page, I get a empty reply below. And the subdir can't open subsequently. Any hints? Thank u.
{"realpath":""}
I am preparing the multi language support. I created a prototype with some translations to see if it works.
Please check jrondorf@438af47 if this looks basically good to you.
Embedding only one language at a time is not covered currently.
For better compatibility with PHP 7. Just needs changing the archive
and zip_file
classes to have a __construct()
instead of archive()
and zip_file()
. I would've done it and sent a PR but I am not sure if you keep the code in a multi-file format somewhere and it'd be useless to do so. Let me know if you want a PR against this ifm.php!
And, thank you for your work on this! ๐ IFM is the only not-broken-on-modern-php single-file file manager with decent editing capabilities, and it's all AJAX-y to boot! It's a blessing for when trying to provide support to people who don't have FTP access to give you and their web hosting's control panel is terrible.
At the moment there occurs a general error.
I am using Chrome. When I change any permissions on files or folders they are not saved. There is no ajax request after changing the permission - and I could not find a "save" button.
When I have file "tรชn.php", it's utf-8 file name. Then error when load
General error occured: No or broken response
Related to #53
When an existing filename contains a special character like quotes or lower / greater than signs, they will not be displayed correctly, and opening the files will not be possible. Potentially also a cross site scripting security issue.
I know it might not be possible to get all corner cases solved (like, filename contains a unicode character, you encode the for display, after selecting the file, the file opens properly), but maybe a simple html encode for these names is already enough.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.