ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Block big image upload or resize in the 2.2.1 File Manager?

July 13, 2011 6:11am

Subscribe [3]
  • #1 / Jul 13, 2011 6:11am

    noregt

    360 posts

    Hi everyone,

    I’ve been testing the 2.2.1. version and especially the File manager, because to me that was one of the things that could use some / a lot improvement. I’m happy to say that the latest version is way better, almost perfect!

    Here’s one thing I would like to get clear. In previous versions, if I would upload an original image from the camera (which a lot of people do, no matter how I warn them), the upload would be blocked. My main issue with that workflow was that the feedback was way to obscure, very hard to see, thus unusable.

    I noticed that now, bigger files are resized to the set maximum. In many cases this can be fine, but with the ever growing sizes of image files (many already have 20 Mp or more) this could cause PHP buffer issues. Is there no way to set a limit for upload size in pixels?

  • #2 / Jul 13, 2011 4:31pm

    Kevin Smith

    4784 posts

    Hi noregt,

    Glad to hear you’re enjoying the new File Manager! Unfortunately for your needs, the way PHP handles uploads is all tied to the file size itself, so the only way we can set the upload limit is by using those units. As I’m sure you know, several images with the same pixel count can vary dramatically in size, and the server needs to be able to set a limit. With the current paradigm, limiting by file size is the only thing that makes sense.

    Does that help shed light on your question?

  • #3 / Jul 13, 2011 5:33pm

    noregt

    360 posts

    That seems clear Kevin, but just for my insight, why then was blocking by pixel size possible in previous versions (even in 2.x)? Was that because it uploaded the file first, read the pixel dimension and the flushed it if to big?

    One of my reasons for dumping the image gallery module was the fact that it would not block images with exceeding pixel sizes. I was not able to force people to resize the image before uploading, so regulalry had people complaining about the white screen error.  The general file upload did block.

    Limiting file size is an in-between solution, I’ll test it, thanks.

  • #4 / Jul 14, 2011 10:59pm

    Lisa Wess

    20502 posts

    Hi, noregt -

    I… must be losing my memory here, so forgive me.  I don’t remember any version of EE limiting by pixel size.  Do you have a screenshot of what you mean here?  I’m wracking my brain trying to remember what you’re saying.  Seeing it would really help.

    Thank you. =)

  • #5 / Jul 15, 2011 6:20am

    noregt

    360 posts

    Hi Lisa,

    This is what happens in the 1.x version, see image.

    Without any file size set, the system generated an error if the image exceded the max image size. Now it just resizes. Currently I’m using the old method and then resize them with CE image.

    This behavior was the same in EE 2.0, just with a slightly different feedback interface, the feedback was in the CP itself, see second image.

    EDIT: In a perfect world, we would be able to set the max upload pixel size AND the max image target dimensions. Because auto resizing has it advantages too, some end-users have no clue what they’re doing… (renaming a psd file to a jpeg for instance and then complain that the upload does not work for instance 😖)

  • #6 / Jul 15, 2011 9:22am

    Sue Crocker

    26054 posts

    Hi, noregt.

    You’re right, EE will attempt to resize the image to fit the maximum image width you set. Is that a behavior you want to be able to toggle? In other words, if you wanted automatic resizing in one folder, but not in another.. that would require a feature request.

  • #7 / Jul 15, 2011 9:28am

    noregt

    360 posts

    Well at least this makes clear that the behavior has changed. Ideally I would love to have both settings available, bot being able to toggle would be a second best.

    I’ll make a FR then.

  • #8 / Jul 15, 2011 9:34am

    Sue Crocker

    26054 posts

    Sounds good.. If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases