The filefield_field_sanitize() function in filefield_field.inc contains the following verification check that the file exists on the server (starting at line 314):

// Verify the file exists on the server.
if (!empty($item['filepath']) && !file_exists($item['filepath'])) {
    watchdog('filefield', 'FileField was trying to display the file %file, but it does not exist.', array('%file' => $item['filepath']), WATCHDOG_WARNING);
}

When another module like media_mover exists, the file can be moved to a remote server such as Amazon S3 and the $item['filepath'] becomes a URL which in our case starts out as "https://s3.amazonaws.com/..." This fails the test for file_exists() since the PHP function file_exists doesn't support http/https. The PHP documentation for file_exists says to look at the page for Supported Protocols and Wrappers to see which support the stat() functionality, and the PHP documentation page on http clearly says it does not support stat().

I don't know whether it is appropriate to use a function other than purely file_exists, or at least to check to see if "http" starts the $item['filepath'], but I believe the watchdog warning message is misleading and/or incorrect.

Comments

quicksketch’s picture

Drupal 6 as far as I know doesn't support remote files at all. Seems like something you should ask in the Media Mover queue, as FileField is built to only handle local files.

quicksketch’s picture

Status: Active » Closed (won't fix)

With the D6 version of media_mover no longer supported, I don't plan on making adjustments to FileField to accomodate it.