[Neos] Filefield in Custom Content Type
Aske Ertmann
aske at moc.net
Sat Mar 22 17:16:47 CET 2014
Hey Andy
Unfortunately this is a feature that's not supported yet. Currently there's only support for images, but it's a topic lots of people are requesting and also something that we're working on. Rens Admiral has put some work into it already and I hope that we'll have something available within a few weeks.
We'll post to the mailing list when we have something to try out.
Greetings
Aske
On Mar 21, 2014, at 9:52 AM, Andy Adiwidjaja <adiwidjaja at gmail.com> wrote:
> Hello all,
>
> I am new to Typo3 Neos and to this mailinglist. I'm not an active
> typo3-developer but neos is really great, but has some open ends. My
> current question, also unanswered on Stackoverflow:
>
> http://stackoverflow.com/questions/22515418/typo3-neos-filefield-in-custom-content-type
>
> I want to make a custom content type with the possibility to edit a
> download file. In my NodeTypes.yaml I have:
>
> 'Vendor.Prefix:MyContentType':
> superTypes: ['TYPO3.Neos:Content']
> ui:
> label: My Content Type
> icon: 'icon-file-text'
> inspector:
> groups:
> 'props':
> label: Properties
> properties:
> 'title':
> type: string
> defaultValue: 'Example Title'
> ui:
> label: 'Title'
> inlineEditable: TRUE
>
> Now - how do I create a file upload field? I only found working examples
> for image fields:
>
> 'chapterImage':
> type: 'TYPO3\Media\Domain\Model\ImageVariant'
> ui:
> label: 'Chapter image'
> reloadIfChanged: TRUE
> inspector:
> group: 'document'
>
> In the same folder, there are classes for file uploads, but this doesn't
> work:
>
> 'grundriss':
> type: 'TYPO3\Media\Domain\Model\Document'
> ui:
> label: 'Grundriss'
> editor: 'TYPO3.Neos/Inspector/Editors/FileUpload'
> inspector:
> group: 'props'
>
> Neither with nor without the 'editor' line. It leads to the javascript
> error:
>
> Uncaught TypeError: Cannot read property 'editor' of undefined
> Uncaught Error: You cannot modify child views while in the inBuffer state
>
> And to an empty property inspector.
>
> Has anyone a tip for me?
> Thanks in advance for your help!
>
>
> Andy
> --
> Andy Adiwidjaja
> Adiwidjaja Teamworks GmbH // Solutions Consulting
> aa at adiwidjaja.com
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos
More information about the Neos
mailing list