What's new in EzyPlatform 1.3.5?

This release expands media replacement history and file retention capabilities, adds new platform and module update commands to the CLI, enhances the SDK and Setting Service, and strengthens session security when account statuses change.
  1. Keep previous media files after replacement
    When allowKeepingReplacedMedia is enabled, the system keeps the previous media file after replacement instead of deleting it immediately. This allows administrators to review, compare, or restore previous media versions when necessary.
  2. Added media replacement history
    EzyPlatform now stores and displays the history of media files that have been replaced. Replacement history APIs are available for administrators with full media access, administrators who can only access their own media, and Web users who can only access media they own.
  3. Improved duplicate media name handling
    When uploading media or adding media from a URL with a name that already exists, the system automatically generates a new name to prevent overwriting and naming conflicts. The original filename is still preserved in originalName to retain the source file information.
  4. Enhanced validation when updating media
    When editing media, the system now prevents the use of an originalName that already belongs to another media item. This helps maintain data uniqueness and avoids ambiguity when retrieving media by its original filename.
  5. Improved media deletion behavior
    Media deletion now respects the setting that controls whether physical media files should be permanently deleted. Additional tests have also been added for file deletion, retention, and replacement scenarios to improve system stability.
  6. Enhanced media management interface in Admin
    Added the Allow keeping replaced media option to the Admin and Website configuration sections, together with a new interface for viewing media replacement history. The media management interface has also been separated into dedicated modals for adding new media, viewing media details, viewing replacement history, and confirming the reduction of selected media files, making the code easier to maintain and extend.
  7. Added multilingual content
    Added translations for allow_keeping_replaced_media and replace_history, ensuring that the media retention option and replacement history interface are displayed consistently across supported languages.
  8. Added EzyPlatform update commands to the CLI
    The CLI now provides the update command, with u and -u as aliases, for downloading and preparing the latest EzyPlatform version in the update directory.
  9. Added module update commands
    Added the update-modules command, with ums and -ums as aliases, to check for, download, and prepare updates for installed modules.
  10. Separated the update application step
    Added the run-update command, with ru and -ru as aliases, to apply downloaded update files and restart the services. Platform and module update commands now only download and prepare update files, while stopping and restarting the Admin, Web, and Socket services is handled separately by run-update.
  11. Improved service start and restart behavior
    Start and restart operations now automatically skip the Web or Socket service when the corresponding target is disabled. This prevents services that are not used in the current configuration from being started unintentionally.
  12. Extended metadata APIs in the SDK
    Added getLatestAdminMetaByAdminIdAndMetaKey(...), getLatestUserMetaByUserIdAndMetaKey(...), and getLatestDataMetaByDataTypeAndDataIdAndMetaKey(...). These APIs make it easier to retrieve the latest metadata entry for a specific object and meta key.
  13. Extended the Setting change watcher
    SettingService.watchLastUpdatedTime(...) now supports the callImmediately option. Callers can choose whether the callback should run immediately when the watcher is registered or only when new changes occur afterward.
  14. Added constants for media replacement
    New constants have been added for media replacement history and the setting that controls whether replaced media files should be retained. Standardizing these values improves consistency and reduces errors when they are used across multiple modules.
  15. Strengthened session security
    Admin and User access tokens are now deleted when important account status changes occur. This prevents existing sessions from remaining active after an account is locked, has its status changed, or undergoes other security-related updates.
  16. Added support for updating Admin access token expiration
    Added a function for updating the expiration time of an Admin access token when the token exists. This allows the system to extend or adjust session lifetimes in appropriate business workflows.