amazon-s3-php-class icon indicating copy to clipboard operation
amazon-s3-php-class copied to clipboard

inputFile() problem

Open yolaus opened this issue 11 years ago • 1 comments

inputFile() method uses php is_readable() funcion. Results from this function are cached. See http://www.php.net/manual/en/function.is-readable.php

So I had to include a call to clearstatcache() php function before is_readable() call. http://www.php.net/manual/pt_BR/function.clearstatcache.php.

My problem was because a batch file execution which try to read file names from database and copy from one directory to a S3 bucket. When file is not found in directory, the execution waits some seconds and try to read it again.

yolaus avatar Feb 05 '14 12:02 yolaus

Maybe inputFile() should have an extra parameter to bypass it... But you could just call putObject() with an input array instead:

$input = array('file' => $file, 'size' => filesize($file), base64_encode(md5_file($file, true)));

tpyo avatar Feb 05 '14 14:02 tpyo