public static function createFromData($data, $destination, $mimeType, $filename = '')
    {
        $tmp = tempnam('/tmp', 'qtism');
        file_put_contents($tmp, $data);

        $file = self::createFromExistingFile($tmp, $destination, $mimeType, $filename);
        unlink($tmp);

        return $file;
    }