From The Blog

Drupal file_copy won't work outside of the Drupal installation directory

9 January 2012, in

The selected file could not be uploaded, because the destination is not properly configured

This "feature" has bitten me before. It's one of those annoying Drupal things which would be fine if the error message wasn't so misleading.

What's happening is that file_copy() calls file_create_path()

<?php
function file_copy(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
$dest = file_create_path($dest);
?>

 



Post a Comment