Topic: xajax doesn't want to transfer the file

Hello!
As I can not transfer the file means of xajax

$core = '../xajax_core';
require_once $core . '/xajax.inc.php';
   
$xajax = new xajax();
$xajax->configure("debug", true);

$xajax->register(XAJAX_FUNCTION,"uploader");

$xajax->processRequest();
$xajax->configure('javascript URI','../');

function uploader($aFormValues)
{
    $objResponse = new xajaxResponse();

    exit('<pre>'. print_r ($_FILES, true).'</pre>');

    return $objResponse;
}

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>!!</title>
<?php $xajax->printJavascript( "../" ) ?>  
</head>
<body>

<?php

echo '<form enctype="multipart/form-data" id="upload_form" action="" onsubmit="return false;" method="post" >
<input type="file" name="file" id="upload_images" />
<input type="button" value="Submit" onclick="xajax_uploader(xajax.getFormValues(\'upload_form\'))" />
</form>';
    
?>
    
</body>
</html>
RECEIVED [status: 200, size: 21 bytes, time: 62ms]:
<pre>Array
(
)
</pre>

What do I do not correctly? Somebody can help me?

Re: xajax doesn't want to transfer the file

Hi,

You cannot use ajax to do uploads. Look in the plugins section for an upload plugin.

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.