X3 Photo Gallery Support Forums

User avatar
X3 Wizard
Topic Author
Posts: 12256
Joined: 30 Sep 2006, 03:37

Files app 0.2.0 :apple:

26 Aug 2020, 04:17

Files app 0.2.0 :apple:
This Files app update introduces many improvements! [demo][config]

Image resizer (thumbnails)
  • New option image_resize_sharpen (enabled by default) creates sharper (less blurry) preview images. * Will not recreate existing image cache.
  • New option image_resize_memory_limit temporarily 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_limit is already higher than this value, it will have no effect.
  • New option image_resize_max_pixels sets the maximum allowed dimensions for resizing images.  Default value is set to 30000000 (30 MP), 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.
  • Both image_resize_memory_limit and image_resize_max_pixels are now used to estimate which images are too large to be resized.
  • Removed options image_resize_min_filesize and image_resize_max_filesize which are no longer logical or useful.
Symlink support
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. See symlink examples in demo > tests > symlinks.
  • New indicator icons for symlinks in list and menu.
  • New option allow_symlinks allows Files app to display and follow symlinks in both the list and menu.
  • New option menu_recursive_symlinks allows listing of subdirs of symlinks in the main menu. May cause harmless menu loops and/or duplicate menu items.
Windows server support
Files app now works flawlessly also on Windows OS based servers which may use \backslashes in directory paths. Tested on Windows using Laragon server [forum]

EXIF Image Orientation
Images with orientation stored in EXIF will now display correctly rotated in popup and modal, while resized images are correctly rotated according to image EXIF orientation (see  forum and exif orientation demo). * This only works on servers with PHP EXIF extension enabled and in most modern browsers that support CSS image-orientation

Scrollbar UI design
New unobtrusive scrollbar designs in menu and main window that match the Files app design. Menu overflow scrollbar now only appears on mouse hover, and scrollbar is temporarily removed when opening popup. * Scrollbar improvements apply for OS/devices that have physical scrollbars (mainly Windows OS).

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 (disabled by default) 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.

CSS variables
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. The following variables are already available (use _files/css/custom.css):
:root {
  --strong-color: seagreen;
  --sidebar-width: calc(10vw + 180px);
  --sidebar-width-small: 85vw;
  --sidebar-width-hover: 480px;
  --row-height: 100px;
  --row-large-height: 160px;
  --columns-width: 160px;
  --grid-small: 100px;
  --grid-large: 158px;
More improvements ...
  • 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.
  • Updated several external Javascript plugins.
Bug fixes
  • 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.
License *optional
We have now included the option to purchase a license [$39.00] directly from the Files app interface. Purchasing a license removes the license popup and unlocks features (mostly coming soon). More importantly, you are supporting Files app development! * License is entirely optional, and there will always be a free version with all basic features.

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.

Config options


main demo / login / modal / disabled images / disabled menu / preload all / single dir