This Files app update introduces tons of improvements!See demo
As requested, we have now added support for symlinks (shortcuts) in Files app. This is a very useful feature, which allows Files app to read content from multiple unique directories. Support for symlinks is enabled by default, but can be disabled from new option
allow_symlinks. Also find new option
menu_recursive_symlinks which allows subdirs of symlinks in the menu menu *may cause menu loops or duplicate menu items, depending on your folder structure. See symlinks demo.
Windows server support
EXIF Image Orientation
Scrollbar UI design
New unobtrusive scrollbar designs that match the Files app design. Menu overflow scrollbar now only appears on mouse hover, and scrollbar is temporarily removed when opening popup.
Extensive mime type mapping
Mime type is used to detect the type of file (image, video, text etc) so that Files app knows what to do with it. Instead of extracting on server (PHP), file mime-type is now mapped from file extension, which is much faster. We use an extensive list of file extensions correctly mapped to mime type, which solves issues with misconfigured servers returning incorrect or missing mime types (forum). New option
get_mime_type will force server (PHP) to extract file mime types. This is slower, but more accurate if your files have extensions that don't match the actual file type.
Files app now uses CSS variables (works in all modern browsers), which allow great flexibility for those who want to customize advanced layout/design features. CSS variables can be assigned from
_files/css/custom.css. The following variables were added:
--sidebar-width: calc(10vw + 180px);
- New option enabled by default
image_resize_sharpencreates sharper preview images.
- New option
image_resize_memory_limittemporarily increases PHP memory limit if required when resizing large images. Default value is set to
128 MB, which allows resizing images up to ~ 6000 px. If your PHP
memory_limitis already higher than this value, it will have no effect.
- New option
image_resize_max_pixelssets the maximum allowed dimensions for resizing images. Default value is set to
30000000(30 megapixels), which allows resizing images equivalent to
6000 x 5000 px. _* This option is in place to protect server from attempting to resize images beyond capabilities and/or slow performance.__
image_resize_max_pixelsare now used to estimate which images are too large to be resized.
- New indicator for forbidden (unreadable) files and folders in list and menu. Forbidden images don't attempt to load preview image and won't attempt to open in popup. * See forbidden example in demo > tests > forbidden.
- Added download-button in popup for touch/mobile devices (forum). This works in most modern mobile devices that support the download attribute, although in iOS Chrome browser it currently opens image in browser instead of downloading.
- New option show_hidden_files allows Files app to show hidden/system files (normally files that start with a .dot like .htaccess).
- New option context_menu set to false disables context-menu button and right-click menu (forum).
- New option prevent_right_click blocks browser right-click menu to prevent easily downloading images (forum)
- Files app will now update user config file (normally _files/config/config.php) with new options after updating. Code viewer can now view/edit empty text files and .htaccess files.
- Improved error-reporting and all requests (images, json, html) now include memory usage and request time in response headers.
- Upgraded to new Bootstrap 5. Files app will be using more features from Bootstrap 5 in future releases.
- Fixed sidebar toggle-expand button for mobile/touch devices.
- Files app now works without PHP EXIF extension, although with reduced functionality.
- Can now edit .htaccess and empty text files (when code_allow_edit option is enabled).
- Fixed so that Files app still works when JSON mime-type is incorrectly set to "text/plain".
- Fixed url paths when current folder is same as document root.
- Fixed a bug where top right context-menu button in popup was not updating after navigating to next image.
How to update?
Simply update directly from the "bell" icon top right of Files app or download latest index.php. * All your custom config will remain in tact as long as you are adding your config to _files/config/config.php.