private function createTemporaryFile($content) { $path = tempnam(sys_get_temp_dir(), 'media'); file_put_contents($path, $content); return $path; }