[Product-Developers] ImageWidget: atapi.ImageField vs plone.app.blob.field.ImageField

Christian Ledermann christian.ledermann at gmail.com
Mon Mar 19 13:10:36 UTC 2012


Yes, this is not the problem. actually this field did not exist before
so I had to upload the image.

I ran into this problem when I added the field (in the schema) as
plone.app.blob.field.ImageField

Nothing displays.


when i create the field with atapi.ImageField (deleting the old content before
I apply the new schema and then uploading the image again) it works as expected.

On Mon, Mar 19, 2012 at 4:02 PM, Nathan Van Gheem <vangheem at gmail.com> wrote:
> Did you re-upload the image? Changing storage without migration will
> mean the field no longer knows where the image is most likely.
>
> On Mon, Mar 19, 2012 at 7:32 AM, Christian Ledermann
> <christian.ledermann at gmail.com> wrote:
>> Hello,
>>
>> if I define an image for my contenttype as:
>>
>>    atapi.ImageField('logo_image',
>>        max_size = (64,64),
>>        widget=atapi.ImageWidget(label=_(u'Logo'),
>>                        description=_(u'The organizations logo'),
>>                    ),
>>    ),
>>
>> everything is fine.
>> However when i define it as recommended in
>> http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0/updating-add-on-products-for-plone-4.0/use-plone.app.blob-based-blob-storage
>>
>> from plone.app.blob.field import ImageField
>> ...
>>
>>    ImageField('logo_image',
>>        max_size = (64,64),
>>        widget=atapi.ImageWidget(label=_(u'Logo'),
>>                        description=_(u'The organizations logo'),
>>                    ),
>>    ),
>>
>>
>> The widget will not display the image widget and the image is not
>> accessible at the
>> url context/absolute_url/logo_image
>>
>> any pointers?
>>
>>
>> --
>> Best Regards,
>>
>> Christian Ledermann
>>
>> Nairobi - Kenya
>> Mobile : +254 702978914
>>
>> <*)))>{
>>
>> If you save the living environment, the biodiversity that we have left,
>> you will also automatically save the physical environment, too. But If
>> you only save the physical environment, you will ultimately lose both.
>>
>> 1) Don’t drive species to extinction
>>
>> 2) Don’t destroy a habitat that species rely on.
>>
>> 3) Don’t change the climate in ways that will result in the above.
>>
>> }<(((*>
>> _______________________________________________
>> Product-Developers mailing list
>> Product-Developers at lists.plone.org
>> https://lists.plone.org/mailman/listinfo/plone-product-developers



-- 
Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 702978914

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>


More information about the Product-Developers mailing list