Closed (duplicate)
Project:
Upload Image
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2008 at 12:54 UTC
Updated:
16 Feb 2010 at 20:52 UTC
Hi there. I am using this great module because it is so convenient to be able to just attach images and have them transformed into image nodes on the fly. These can then be themed automatically, which makes it easy for the end user.
However, I am seeing an idiosyncrasy of the module: as the image files are changed into nodes, they are moved to the images subdirectory. But the upload module continues to show them as inhabiting the files main directory.
I am putting this is as a support request and not a bug, but I would like to know what you think is the best way of solving this problem.
See attached screenshot. Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| filename_incongruency.png | 27.38 KB | victorkane |
Comments
Comment #1
ansorg commentedchange to "bug".
It's not only cosmetic, it causes other modules that work with the image to fail because the image cannot be found at the stored filename "sites/domain/files/mage.jpg"
I looked at the code but so far no idea how to fix this :(
Comment #2
ansorg commentedhm, I might have an idea what's going wrong:
first, I use http://drupal.org/project/uploadpath module in addition. This has some issues of it's own but I got it to behave as it should. So, when I attach an image to a node
- uploadpath kicks in and copies the image into a specified subdirectory "sites/domain/files/newfolder/*.jpg" and updates the files table
- upload_image kicks in and creates a image node out of that $file from the files table. The physical files remain untouched in the "newfolder" (checked this by commenting out the _image_build_derivatives call from the module)
But at some point - either directly in the module (if not commented out) or later, if the images are actually displayed, the _image_build_derivatives (from image.module) gets called and this function seems to move/create all images in "sites/domain/images", ignoring the current file location.
To me it looks like this has to get changed?
Could anybody take a look at all this and confirm my findings?
Since I believe this is an issue in image.module I post the bug over there: http://drupal.org/node/256210
Jens
Comment #3
acolonna commentedA simple solution is to add this code to the upload_image_save function:
Comment #4
killes@www.drop.org commentedsee #131597: The selected file could not be copied, because no file by that name exists.
Comment #5
Hobbes-2 commentedsubscribe