Hi,

I have a limit on image size (800ko), and when importing bigger images, Acidfree tells me they are too big but it creates an empty image anyway ,with the file name as a title.

CommentFileSizeAuthor
#1 node_from_file_size_check.patch475 bytesvhmauery
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vhmauery’s picture

Title: Acidfree creates empty image if file is too big » image_create_node_from creates image if file is too big
Project: Acidfree Albums » Image
Component: Code » image.module
Status: Active » Needs review
FileSize
475 bytes

I assume this is on mass import? The mass import stuff has been rewritten to work with the new image_create_node_from function. This, however, will allow you to create a file larger than the max image size too, but it does it correctly.

I am re-assigning this to the image module and posting my patch to fix it since this is a workaround to the max file size.

Hetta’s picture

Marked http://drupal.org/node/231753 as duplicate - that's 6.x-dev, though.

vhmauery’s picture

marked http://drupal.org/node/242911 as duplicate.

drewish’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

marked #244751: No warning displayed if filesize too big. Just 'OK, your image was created' ... NOT! as a duplicate.

this needs to be committed to 6.x first and then backported to the 5.x-2.x branch.

dman’s picture

Patch above is not much help. It simply disables filesize restrictions altogether.
I presume thats not really what we want to do.

I want to see an error flagged and the image-save aborted.

For other cases, perhaps an override checkbox could be provided.

In all cases, I think creating a null image node is the wrong behaviour.

vhmauery’s picture

dman,

I don't think you read the patch correctly. The patch doesn't disable filesize restrictions, it enforces them. It does half of what you want. It aborts without creating a null image node. The thing it doesn't do is logging (I leave that as an exercise to the caller).

dman’s picture

You're right, I didn't read well.
I saw '-' where there was '+' and thought it was just a temporary work around. Sorry!

drewish’s picture

Status: Needs review » Needs work

didn't test this but the indenting is being done with a tab rather than spaces...

sun’s picture

Status: Needs work » Closed (duplicate)

This seems to have been fixed already.

If I'm mistaken, then incorporate the required fix into #298702: Properly validate image uploads, please.