Download & Extend

Moving imagefield thumbnails to final directory

Project:File (Field) Paths
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I've come across the following situation where I'm using imagefield to upload images, and filefield paths to direct the images to a specific directory, for example, /sites/default/files/photos/albumX

When the image is first uploaded the files (original and thumbnail) goto

/sites/default/files/photos/[title]

which is what I expect. However, when I save the node, only the original file is moved to /sites/default/files/photos/albumX. The thumbnail remains in /sites/default/files/photos/[title]. does this module actually move the files then, or is something else responsible for that? I'm pretty sure this was working before, and I would like to track down what is causing the issue :)

Comments

#1

More info. If I edit the node, the imagefield module is expecting the thumbnail to be in /sites/default/files/photos/albumX (view source on page shows that), but it's not there and so I don't see any image thumbnail when editing the node.

#2

Yes, FileField Paths should be moving the thumbnail as well. Will look into it.

#3

The following seems to be the problem

      // Move ImageField thumbnail
      if ($file['module'] == 'imagefield') {
        file_move(

$file['module'] is returning 'filefield' ... I've implemented a short term hack for now :)

#4

Update - This may be due to the fact that I'm setting the field type to file, instead of image, when creating the CCK field. I raised this question in the imagefield project because it seems like you can build your CCK imagefield either way and looks to work the same, but I could be mistaken about that :)

#400028: Select a field type - Image or File

#5

Category:support request» bug report

This is now a bigger issue as the latest version of ImageField removed the 'Image' type completely.

Will by fixed ASAP.

#6

Status:active» fixed

Fixed and Committed to DRUPAL-6--1.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here