In field_file_check_directory() I've added dpm($directory).

For FileFields I got a normal output
/var/www/vhosts/example.com/files

However for ImageField I got the picture attached.

CommentFileSizeAuthor
#2 420666_filefield_check_dir_3.patch889 bytesamitaibu
snap1.png34.67 KBamitaibu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

Assigned: amitaibu » Unassigned
Status: Closed (fixed) » Active

My problem by the way is the I get a
warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/XXX.com) is not within the allowed path(s): (/var/www/vhosts/XXX.com/httpdocs:/tmp:/var/www/vhosts/XXX.com/private)

amitaibu’s picture

Assigned: Unassigned » amitaibu
Status: Active » Needs review
FileSize
889 bytes

Patch allow checking only directories inside the file path.

quicksketch’s picture

Status: Needs review » Fixed

Thanks Amitaibu, checked with private and public files and it works as expected. Thanks for the nice fix!

Status: Fixed » Closed (fixed)

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

Status: Active » Closed (fixed)