Hello,
in the createFile function i store the file to a specific location, and afterwards, I save the information in the database for future reference.
The file is saved, but 'filesize()' returns 0 bytes. The variable $bytes contains also the value '0'. And of course, the mime_type utility function (using 'finfo_file()') returns 'application/x-empty').
This is the function:
public function createFile($name, $data = null) {
$bytes = file_put_contents($name, $data);
$file->mimetype = Util::mime_type($name);
$file->size = filesize($name);
}
How can I get the correct values?
Thanks in advance.
David