I can't get image import to work at all. I assume I'm doing something wrong rather than encountering a bug, but it's not entirely clear what's going wrong.

On Content mangement => Image import I get a list of images in the import directory I've configured. This list appears to be correct. I check the left hand box for an image or images (I've tried both) and click Import.

I then get a screen that says "Importing Image" followed by a progress bar followed by "Importing 0 of 0". This occurs regardless of how many images I select or whether a gallery is selected. Always zero of zero.

Creating a new image node works correctly, which leads me to believe:
1) the destination image path is writeable by the web server
2) GD2 is installed and working

I don't mind digging into the code a bit if need be, but with no error messages I'm not entirely sure where to begin.

Comments

gohanman’s picture

Follow up:

file_check_location was returning false because I'd dropped a symlink in the import directory instead of actually copying the images over. Maybe there's a good security reason to have this be a completely silent error, but a little "Don't use symlinks" warning in the documentation probably wouldn't hurt.

joachim’s picture

Why are we even using file_check_location()? Is there a potential security risk here?

joachim’s picture

Title: Image import doesn't work » Image import doesn't work with symlinks
Category: support » feature
sun’s picture

Status: Active » Closed (works as designed)

Symlinking the import directory instead of directly providing it sounds too much like an edge-case to me. Image import provides the option to delete the files after the import, so yes, usage of file_check_location() sounds right.