ZCML File
configure.zcml

<configure
    xmlns="http://namespaces.zope.org/zope"
    i18n_domain="zope"
    >
<interface
    interface=".interfaces.IFile"
    type="zope.app.content.interfaces.IContentType"
    />
<interface
    interface=".interfaces.IImage"
    type="zope.app.content.interfaces.IContentType"
    />
<permission
    id="zope.AddImages"
    title="[add-images-permission] Add Images"
    />
<class
    class=".file.File"
    >
<factory
    id="zope.app.content.File"
    title="File"
    description="A File"
    />
<require
    permission="zope.View"
    interface=".interfaces.IFile"
    />
<require
    permission="zope.ManageContent"
    set_schema=".interfaces.IFile"
    />
</class>
<class
    class=".image.Image"
    >
<factory
    id="zope.app.content.Image"
    title="Image"
    description="An Image"
    />
<require
    permission="zope.View"
    interface="zope.app.file.interfaces.IImage"
    />
<require
    permission="zope.ManageContent"
    set_schema="zope.app.file.interfaces.IFile"
    />
</class>
<adapter
    factory=".image.ImageSized"
    provides="zope.size.interfaces.ISized"
    for=".interfaces.IImage"
    />
<adapter
    factory=".file.FileReadFile"
    provides="zope.filerepresentation.interfaces.IReadFile"
    for=".interfaces.IFile"
    permission="zope.View"
    />
<adapter
    factory=".file.FileWriteFile"
    provides="zope.filerepresentation.interfaces.IWriteFile"
    for=".interfaces.IFile"
    permission="zope.ManageContent"
    />
<adapter
    factory=".image.FileFactory"
    provides="zope.filerepresentation.interfaces.IFileFactory"
    for="zope.app.folder.interfaces.IFolder"
    permission="zope.ManageContent"
    />
<include
    package=".browser"
    />
</configure>