Question at max-image-dimension

classic Classic list List threaded Threaded
5 messages Options
vii vii
Reply | Threaded
Open this post in threaded view
|

Question at max-image-dimension

Hello list

Very short before easter I have a question about the
plone.recipe.atcontenttypes.
If I use this recipe in my buildout.cfg not all settings are working??
I use these settings:

    parts =
        ....
        atcontenttypes-conf


    [atcontenttypes-conf]
    recipe                 = plone.recipe.atcontenttypes
    zope-instance-location = ${instance:location}
    max-image-dimension    = ATNewsItem:930,930
                             ATImage:930,930
    max-file-size          = ATFile:2mb
                             ATImage:150kb

After buildout they all where in the
./zinstance/parts/instance/etc/atcontenttypes.conf file:

    <archetype ATNewsItem>
      # maximum image dimension (w, h)
      # 0,0 means no rescaling of the original image
      max_image_dimension 930,930
    </archetype>

    <archetype ATImage>
      # maximum file size in byte, kb or mb
      max_file_size 150kb
      # maximum image dimension (w, h)
      # 0,0 means no rescaling of the original image
      max_image_dimension 930,930
    </archetype>^

If I create a new NewsItem the image is correctly reduced to the maximum
dimension I want. If I create a new Image the maximum file size gets
checked but the image stays allways at the dimension it has.

Does anyone know why? I'm using Plone 4.2.4.

Regards
Viktor







------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
vii vii
Reply | Threaded
Open this post in threaded view
|

Re: Question at max-image-dimension

Sorry: I forgot to mention one further aspekt:
If I upload some pictures via ftp neither the maximum dimension nor the maximum file-size is checked?!

Is it just not possible to do these checks for ftp-uploads? Or is there something wrong in my setup?

Regards
Viktor





> -----Ursprüngliche Nachricht-----
> Von: Viktor Errath
> Gesendet: Freitag, 29. März 2013 17:22
> An: [hidden email]
> Betreff: Question at max-image-dimension
>
> Hello list
>
> Very short before easter I have a question about the
> plone.recipe.atcontenttypes.
> If I use this recipe in my buildout.cfg not all settings are working??
> I use these settings:
>
>     parts =
>         ....
>         atcontenttypes-conf
>
>
>     [atcontenttypes-conf]
>     recipe                 = plone.recipe.atcontenttypes
>     zope-instance-location = ${instance:location}
>     max-image-dimension    = ATNewsItem:930,930
>                              ATImage:930,930
>     max-file-size          = ATFile:2mb
>                              ATImage:150kb
>
> After buildout they all where in the
> ./zinstance/parts/instance/etc/atcontenttypes.conf file:
>
>     <archetype ATNewsItem>
>       # maximum image dimension (w, h)
>       # 0,0 means no rescaling of the original image
>       max_image_dimension 930,930
>     </archetype>
>
>     <archetype ATImage>
>       # maximum file size in byte, kb or mb
>       max_file_size 150kb
>       # maximum image dimension (w, h)
>       # 0,0 means no rescaling of the original image
>       max_image_dimension 930,930
>     </archetype>^
>
> If I create a new NewsItem the image is correctly reduced to the
> maximum dimension I want. If I create a new Image the maximum file size
> gets checked but the image stays allways at the dimension it has.
>
> Does anyone know why? I'm using Plone 4.2.4.
>
> Regards
> Viktor
>
>
>
>



------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
rbruch rbruch
Reply | Threaded
Open this post in threaded view
|

Re: Question at max-image-dimension

Viktor,

I don't know about your FTP question, but I believe that "ATImage" is no
longer used for images in Plone, instead the blob-based
plone.app.imaging handles the images. Maybe the new method doesn't
translate all the AT settings? News Items still use the old ATImage
format, which is probably why they are responsive to your AT config changes.

-Rick



Viktor Errath wrote:

> Sorry: I forgot to mention one further aspekt:
> If I upload some pictures via ftp neither the maximum dimension nor the maximum file-size is checked?!
>
> Is it just not possible to do these checks for ftp-uploads? Or is there something wrong in my setup?
>
> Regards
> Viktor
>
>
>
>
>
>> -----Ursprüngliche Nachricht-----
>> Von: Viktor Errath
>> Gesendet: Freitag, 29. März 2013 17:22
>> An: [hidden email]
>> Betreff: Question at max-image-dimension
>>
>> Hello list
>>
>> Very short before easter I have a question about the
>> plone.recipe.atcontenttypes.
>> If I use this recipe in my buildout.cfg not all settings are working??
>> I use these settings:
>>
>>      parts =
>>          ....
>>          atcontenttypes-conf
>>
>>
>>      [atcontenttypes-conf]
>>      recipe                 = plone.recipe.atcontenttypes
>>      zope-instance-location = ${instance:location}
>>      max-image-dimension    = ATNewsItem:930,930
>>                               ATImage:930,930
>>      max-file-size          = ATFile:2mb
>>                               ATImage:150kb
>>
>> After buildout they all where in the
>> ./zinstance/parts/instance/etc/atcontenttypes.conf file:
>>
>>      <archetype ATNewsItem>
>>        # maximum image dimension (w, h)
>>        # 0,0 means no rescaling of the original image
>>        max_image_dimension 930,930
>>      </archetype>
>>
>>      <archetype ATImage>
>>        # maximum file size in byte, kb or mb
>>        max_file_size 150kb
>>        # maximum image dimension (w, h)
>>        # 0,0 means no rescaling of the original image
>>        max_image_dimension 930,930
>>      </archetype>^
>>
>> If I create a new NewsItem the image is correctly reduced to the
>> maximum dimension I want. If I create a new Image the maximum file size
>> gets checked but the image stays allways at the dimension it has.
>>
>> Does anyone know why? I'm using Plone 4.2.4.
>>
>> Regards
>> Viktor

------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Raphael Ritz-3 Raphael Ritz-3
Reply | Threaded
Open this post in threaded view
|

Re: Question at max-image-dimension

In reply to this post by vii
On 3/29/13 5:36 PM, Viktor Errath wrote:
Sorry: I forgot to mention one further aspekt:
If I upload some pictures via ftp neither the maximum dimension nor the maximum file-size is checked?!

Is it just not possible to do these checks for ftp-uploads? Or is there something wrong in my setup?

I don't think there is necessarily something wrong
with your setup.
IIRC validations like the ones you are referring to
here are only checked on add/edit form submission
TTW. FTP uploads bypass this "entry channel" and
can therefor violate the constraints formulated there.

For FTP/WebDAV uploads you can introduce custom
handling by subscribing to, e.g.,
Products.Archetypes.interfaces.IWebDAVObjectInitializedEvent

See http://developer.plone.org/components/events.html
and there
http://developer.plone.org/components/events.html#creation-events
for more on this.

HTH

    Raphael


Regards
Viktor





-----Ursprüngliche Nachricht-----
Von: Viktor Errath
Gesendet: Freitag, 29. März 2013 17:22
An: [hidden email]
Betreff: Question at max-image-dimension

Hello list

Very short before easter I have a question about the
plone.recipe.atcontenttypes.
If I use this recipe in my buildout.cfg not all settings are working??
I use these settings:

    parts =
        ....
        atcontenttypes-conf


    [atcontenttypes-conf]
    recipe                 = plone.recipe.atcontenttypes
    zope-instance-location = ${instance:location}
    max-image-dimension    = ATNewsItem:930,930
                             ATImage:930,930
    max-file-size          = ATFile:2mb
                             ATImage:150kb

After buildout they all where in the
./zinstance/parts/instance/etc/atcontenttypes.conf file:

    <archetype ATNewsItem>
      # maximum image dimension (w, h)
      # 0,0 means no rescaling of the original image
      max_image_dimension 930,930
    </archetype>

    <archetype ATImage>
      # maximum file size in byte, kb or mb
      max_file_size 150kb
      # maximum image dimension (w, h)
      # 0,0 means no rescaling of the original image
      max_image_dimension 930,930
    </archetype>^

If I create a new NewsItem the image is correctly reduced to the
maximum dimension I want. If I create a new Image the maximum file size
gets checked but the image stays allways at the dimension it has.

Does anyone know why? I'm using Plone 4.2.4.

Regards
Viktor






------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users


------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
localhost localhost
Reply | Threaded
Open this post in threaded view
|

Re: Question at max-image-dimension

In reply to this post by vii
Actually wonder if you managed to get this fixed. Just tried to do the exact same thing and it seems the max_image_dimension is ignored. Also noticed that setting a max-image-dimension on the ATImage does work. Same goes for pil-quality

I looked into plone.app.blob.subtypes.image.py, and it does refer to the dimension:
max_size = zconf.ATImage.max_image_dimension
So I would asume this is supposed to work. If I request the zconf.ATImage.max_image_dimension at this point, it returns the dimensions I've set in buildout.

This leaves me puzzled :-(