Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

2.0.0-alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@marttinnotta marttinnotta released this 13 Apr 12:32
· 32 commits to v2 since this release

Adds a feature that checks for duplicate media entry by generating has based on first megabyte
of file. This will not work on existing images

This update should allow using any file driver that is supported in Laravel. Please review media config file.

Changed

  • [Breaking change] Storage driver default in nova media field config has been changed from config('filesystems.default') to env('MEDIA_LIBRARY_DRIVER', 'public')
  • [Breaking change] Media model getUrlAttribute, getWebpUrlAttribute and getImageSizesAttribute methods has been fixed by removing URL prefixing.

Updated

  • MediaHandler class createFrom... methods has been updated to support resolve_duplicates. When finding a duplicate
    media item then these methods will return existing instance of that image instead.

Added

  • New file_hash column, will be used to store original file hash to check for duplicates
  • resolve_duplicates key to media field config file. If enabled it will not create a new entry when existing media item is found.

Manual changes required

  • run php artisan migrate to add the new file_hash column
  • default filesystem driver for media field was changed in config file, please review these settings