I followed your instructions and managed to get it working, in my
archetype edit and view views, except that the mime type is stated as
being : text/x-unknown-content-type. This means that I have to browse to
the application in order to open the file.
When I test these files with the attachment it detects the mime types
correctly, but in the Widget section it says :
Please note that links won't work
and this error is generated :
Traceback (innermost last):
Module ZPublisher.Publish, line 113, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 40, in call_object
Module Products.CMFCore.FSPythonScript, line 108, in __call__
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPythonScript, line 163, in _exec
Module None, line 9, in attachment_download
- <FSPythonScript at /Intranet/attachment_download used for
- Line 9
Also, how do I add a text in the view to the box surrounding the
Attachment field file widgets similar to the 'related content' box ? I
have tried adding a description and a label to the Attachment field but
this is repeated for each occurance of the Attachment field widget.
Thanks for your help,
Encolpe Degoute wrote:
> Marie Robichon a écrit :
> Hi Marie,
>>I would like to use ArrayField in my Archteype to allow multiple
>>Attachments. I am a newbie so do not quite know how I do this: my code is
>> widget = AttachmentWidget(
>> description = "",
>> description_msgid = "help_note_attached_file",
>> label = "Files attached to the note",
>> label_msgid = "label_noteattached_file",
>> i18n_domain = "plone")),
>>Is my code above correct ?
> It seems.
> Mine is going like this:
> from Products.CompoundField.ArrayField import ArrayField
> from Products.CompoundField.ArrayWidget import ArrayWidget
> ## ExtensionClass doesn't work with Plone 2.0
> #label="Documentation produit",
> #label_msgid = "label_documentation_file",
> #description="Selectionnez le fichier a joindre en cliquant sur le
> bouton 'Parcourir'",
>>I am getting an error : "Macro ArrayWidget does not exist"
> Get trunk of CompoundField, I committed a modification on ArrayWidget.pt yesterday.
> The last time this error raise up for me it was because CompoundField wasn't
> or because the document schema wasn't updated.
> Tips: do not use the same field id that you used for the old attachment field if
> you want
> to migrate your data.
>>How and where do I define the ArrayWidget ? I am using Attachmentfield
> Yes, it's the good one.