开发者

plone.app BlobField and accessing file

开发者 https://www.devze.com 2023-03-28 11:18 出处:网络
In an archetype, I use a BlobField : from plone.app.blob.field import BlobField BlobField( 开发者_JAVA百科name=\'gpx_total\',

In an archetype, I use a BlobField :

from plone.app.blob.field import BlobField
BlobField(
  开发者_JAVA百科  name='gpx_total',
    widget=FileWidget(
        label='Gpx_total',
        label_msgid='FranceVeloTourisme_label_gpx_total',
        i18n_domain='FranceVeloTourisme',
    ),
),

I upload a file in this field.

Then I want to download the file via the link at_download/gpx_total.

The first time I have a file name "gpw_total" and the second time I have my file with the correct name.

Do I miss something ? I have tried to reindex the catalog, but it do nothing for this case.

Thanks.


You should use plone.app.blob.field.FileField. BlobField is meant to be used only as a base class, not as a field itself.

I can't really know if that's the root of your problem, though, since there's so little detail.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号