DOCS Upgrading file docs

This commit is contained in:
Damian Mooyman 2017-08-31 14:19:04 +12:00
parent 526cff4e55
commit fdc5ad7337
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -817,7 +817,7 @@ large amounts of memory and run for an extended time.
```yml ```yml
File: SilverStripe\Assets\File:
migrate_legacy_file: true 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 If additional security or visibility rules should be applied to File dataobjects, then
make sure to correctly extend `canView` via extensions. 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 Note that pre-existing security solutions for 3.x (such as
[secure assets module](https://github.com/silverstripe/silverstripe-secureassets)) [secure assets module](https://github.com/silverstripe/silverstripe-secureassets))
are incompatible with core file security. are incompatible with core file security.
#### Upgrade code which acts on `Image` #### Upgrade code which acts on `Image`
As all image-specific manipulations has been refactored from `Image` into an `ImageManipulations` trait, which As all image-specific manipulations has been refactored from `Image` into an `ImageManipulations` trait, which