Merge pull request #7329 from open-sausages/pulls/4.0/file-upgrade-docs

DOCS Upgrading file docs
This commit is contained in:
Chris Joe 2017-09-01 13:39:18 +12:00 committed by GitHub
commit 9fb5a2a693

View File

@ -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