Download & Extend

max image upload size is not changing

Project:Node Images
Version:6.x-2.1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

I have set in my image cache the max upload size to 8192 as well as in node images to 8192. Every time i open the edit node images link message displayed is: The maximum upload size is 1 MB. Only files with the following extensions may be uploaded: jpg jpeg gif png. Not only that if i attempt to upload an image larger than 1 mb i get the infamous "js error 0". I have attempted to upload images through reg file attach and i can upload images of any size up to 100 mb which is my current limit for attachments. My js execution max time is also larger than it takes to upload an image (900 sec = 15min) So, i am really confused on whats wrong here.. help?

Comments

#1

ok nvm.. it's not about size something with java. I have been able to upload 1.36 mb image... and limit should be 8mb now as i have changed it in the source code for node image module. But for some strange reason occasionally the js 0 error comes up with high res images

#2

HMM the files actually do get uploaded to node_images, but the ones that give the js 0 error do not get listed in the node_images.. but do get stored. help....

#3

I found where the problem lays...

$status = FALSE;
    switch ($size['operation']) {
      // Depending on the operation, the image will be scaled or resized & cropped
      case 'scale':
        $status = image_scale($original_path, $destination, $size['width'], $size['height']);
        break;

      case 'scale_crop':
        $status = image_scale_and_crop($destination, $destination,  $size['width'], $size['height']);
        break;
    }

removing temprorarily the scale and crop from image module - allowed to upload the image with no problem, with exception that it was not scaled... soooo pliz fix the module to work with the current version of drupals image module. Thanks

#4

and if i just refresh the page after HTTP 0 error.. Drupal says "warning: Division by zero in /home1/cinergyc/public_html/includes/image.inc on line 196."

#5

but its not the image.inc its the image module with the scaling...

#6

That's a bug in node_images.module line 953, node_images_file_limit should be changed to node_images_uploadsize_default - that's the variable set in admin/settings/node_images under Default maximum file size per upload

function _node_images_file_limits($user) {
  return array(
    'extensions' => variable_get('node_images_extensions', 'jpg jpeg gif png'),
    'file_size' => variable_get('node_images_uploadsize_default', 1) * 1024 * 1024,
    'resolution' => variable_get('node_images_large_resolution', 0),
  );
}