Message-ID: <606544019.3578.1485853741544.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3577_1351796236.1485853741544" ------=_Part_3577_1351796236.1485853741544 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Binary files handling

Binary files handling

The eZ Publish 5 API supports multiple binary file handling mech= anisms by means of an IOHandler interface. This feat= ure is used by the Binary= File, Media and Image FieldTypes.

Starting from versions 5.4 / 2014.09, a native IO handler is available.<= /p>

The LegacyKernel IO handler, that runs legacy kernel callbacks, is removed.

Native IO h= andler 5.4 / 2= 014.09

 

The unique IOHandler interface is removed, replace by two d= istinct interfaces:

The IOService uses both.

Configuration

IO handling can now be configured using semantic configuration.

Which IO handlers (metadata & binarydata) is configurable by siteacc= ess. This is the default configuration:

=20
ezpublish:
    system:
        default:
            io:
                metadata_handler: default
                binarydata_handler: default
=20


metadata and binarydata handlers are configured in the ez_io extension. This is what the configuration looks like for the default hand= lers. It declares a metadata handler and a binarydata handler, both labelle= d 'default'. Both handlers are of type 'flysystem', and use the same flysys= tem adapter, labelled 'default' as well.

=20
ez_io:
    metadata_handlers:
        default:
            flysystem:
                adapter: default
    binarydata_handlers:
        default:
            flysystem:
                adapter: default
=20

 

The 'default' flysystem adapter's directory is based on your site settin= gs, and will automatically be set to %ezpublish_legacy.root_dir%/$var= _dir$/$storage_dir$ (example: /path/to/ezpublish_legacy/var/ez= demo_site/storage).

The native Flysystem handler.

league/flysystem (along with FlysystemBundle) is an abstract file handling library.

It is used as the default way to read & write content binary files i= n eZ Publish. It can use the local filesystem (our default configuration), = but is also able to read/write to sftp, zip or cloud filesystems (dropbox, = rackspace, aws-s3).

handler options

adapter

The adapter is the 'driver' used by flysystem to read/write files. Adapt= ers can be declared using oneup_flysystem as follows:

=20
oneup_flysystem:
    adapters:
        default:
            local:
                directory: "/path/to/directory"
=20

 

How to configure other adapters can be found on the b= undle's online documentation. Note that we do not use the Filesystems c= onfiguration described in this documentation, only the adapters.

Upgrading

For those using the default eZFSFileHandler, no configurati= on should be required, and things should just work like before, but without= legacy kernel callbacks for manipulating images & binary files.

For those using the DFS cluster file handler, a new native handler is av= ailable. See the DFS specification.

 

------=_Part_3577_1351796236.1485853741544--