From fdc5ad733742f4965e30253755fd5c2d89dcf4fd Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 31 Aug 2017 14:19:04 +1200 Subject: [PATCH] DOCS Upgrading file docs --- docs/en/04_Changelogs/4.0.0.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index a8a342958..d37364e52 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -817,7 +817,7 @@ large amounts of memory and run for an extended time. ```yml -File: +SilverStripe\Assets\File: migrate_legacy_file: true ``` @@ -828,11 +828,21 @@ that previously visible assets remain visible to the public site. If additional security or visibility rules should be applied to File dataobjects, then make sure to correctly extend `canView` via extensions. +Note that any File dataobject which is not in the `File.allowed_extensions` config will be deleted +from the database during migration. Any invalid file on the filesystem will not be deleted, +but will no longer be attached to a dataobject anymore, and should be cleaned up manually. + +To disable this, set the following config: + +```yaml +SilverStripe\Assets\FileMigrationHelper: + delete_invalid_files: false +``` + Note that pre-existing security solutions for 3.x (such as [secure assets module](https://github.com/silverstripe/silverstripe-secureassets)) are incompatible with core file security. - #### Upgrade code which acts on `Image` As all image-specific manipulations has been refactored from `Image` into an `ImageManipulations` trait, which