by Mathias Kohs.
Thanks for showing me the link to File-API.
Where can I find the params for usering the File-API?
I tried to get the File via File-API:
$fs = get_file_storage();
$file = $fs->get_file(453, "question", "questiontext", 814, "/", 'iOS%20Simulator%20Bildschirmfoto%2004.12.2012%2009.42.23.png');
if ($file) {
$contents = $file->get_content();
syslog(LOG_INFO, "!TOP!: ");
$datei = fopen($CFG->dirroot."/blocks/quizztwogo/TEST.png", "w");
fwrite($datei, $contents);
fclose($datei);
} else {
syslog(LOG_INFO, "TEST dont fitt");
}
The problem is, this code don't fit and the $file doesn't exist, after $fs->get_file...