Filepaths wrong, images not imported correctly
| Project: | image_import |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | syscrusher |
| Status: | closed |
Jump to:
I'm using the 2005/06/14 version of image_import and I've tried both the 4.6 version of image.module (2005/06/11 walkah) and the CVS version (2005/06/13 robrechtj). I'm running Drupal 4.6.1 The regular create content/add image works, but the image_import module doesn't. It says it was successful, but it gets the filenames wrong. It creates files like:
images/originals/files
images/originals/.thumbnailfiles
images/originals/.previewfiles
and then it starts adding integers, starting with zero, like:
images/originals/files_0
images/originals/.thumbnailfiles_0
images/originals/.previewfiles_0
Also, the original files aren't compressed (and the thumbnailfiles seem to be compressed more than they should be, compared to others done with the image module directly).
Any ideas? I'm not new to Drupal module development, but I haven't figured out this one yet.

#1
Greetings, and sorry for the long delay in responding. I was out of town on business for two weeks.
I believe that the latest version of image_import.module from CVS will correct this issue for you. It is directly related to other bugs reported in this forum.
Please test the new version and let me know if the problem is fixed. Also, check TROUBLE.txt from the module distribution for other troubleshooting guidelines; I have updated it to address several common problems that may also be affecting your installation.
Kind regards,
Scott
#2
Thanks! It works great now! The only problem I still had wasn't the script, it was my server timing out after 30 seconds. I added set_time_limit(1000); to the image_import_import() function to workaround that.
#3
That may not be a very good approach to take, unless you want to keep having to fork image_import.module every time I release a new version. The best place to put this would be in settings.php or .htaccess. I probably could put a setting for this into image_import.module, and might consider doing so (or better yet, deriving it from the timeout value already in the config screen), but that setting wouldn't work in PHP "safe mode".
I'm open to suggestions.
Scott
#4
A timeout setting would be nice. I didn't put it in the settings.php file because I wasn't sure it would be a good idea to have a huge timeout for every page. What do you think? How do you change the timeout? I would think it'd be a common problem, since resizing a few dozen digital camera resolution pictures does take awhile.
#5
#6
I'm giving this some consideration for the next version. I'll probably go ahead and release the current method (which relies on a global setting) so that the module can get into production rather than making people wait.
Another user (tayknight) suggested that I can use separate image-downloads so that creation of derivatives (thumbnails, previews, etc.) for each imported image becomes a separate HTTP transaction. That's a really elegant idea, and probably will be in the major release. Again, it's a major change, so I probably will release a stable version with the current feature set first.
I will very likely provide both this feature that you suggest and the feature tayknight suggested, because they are not mutually-exclusive.
Great suggestion -- thanks!
I'm switching this issue to "feature request" so that I'll remember to implement it in the next version.
Scott
#7
Sounds good. Thanks for all your work on this module!
#8
#9
#10
#11
#12