I created a new ImageField CCK field in Drupal 5 (latest core) with the sub-directory of 'products' within the 'files' directory (all inside website directory, public files set in Drupal). Checked the 'products' directory exists and file permissions are ok in Linux. However, on node save you get a message like this:

The selected file /tmp/tmp_YWJWxn could not be copied"

I tried various 'solutions' in #84405: Image upload node can't move file, was working before: "files could not be copied" but nothing seemed to alleviate the problem. I'm not sure at this time if this is unique to ImageField, a core problem or a PHP/Linux configuration problem, but I've exhausted all avenues I can think of on the latter, so I don't think it's that - it's either ImageField-related or a general Drupal 5 upload issue.

Any suggestions gratefully received - repeat:

- this *only* happens when you ask a specific field to use a specific sub-directory of files
- the sub-directory *does* exist
- permissions are 777 recursively on it for now

Comments

greg.harvey’s picture

Just to expand slightly:

There's no AJAX in D5, so the page refreshes after image upload everything is fine (image uploads to /tmp and Drupal displays preview thumb and offers alt/title text options, as expected) but when you save the node and ImageField tries to move the image file from /tmp to /var/www/vhosts/sitename/httpdocs/files/products it fails with the error above. So Drupal *can* upload to /tmp, just can't *move* files from /tmp to the target directory - unless that target directory is 'files' itself.

quicksketch’s picture

Status: Active » Closed (won't fix)

The Drupal 5 version is no longer supported.