Ajax图像上传 - 获取tmpname

Iam trying to create Ajax-Image Upload. Inorder to move image using move_uploaded_file() i need the name and tmp_name. Is there any functions in javascript to get the filename and temporary file name like the following on php.

$n=$_FILES["filefield"]["name"];
$t=$_FILES["filefield"]["tmp_name"];

I have the image name on the variable $newTidImg[1]. Can i assign like following

$n=$_FILES[$newTidImg[1]]["name"];
$t=$_FILES[$newTidImg[1]]["tmp_name"];

The following function used for ajax post which passes id and image name to changeImageAjx.php

function ajximgupls(trid,imgnam)

var tridImgval = trid+','+imgnam;
jQuery.ajax({
type: 'POST',
url: 'changeImageAjx.php',
data: 'urlTidimgs='+ tridImgval,
cache: false,
success: function(ret)

Thanks in advance.

You cannot handle the image from javascript. but you can send the image back to javascript from php. $_FILES["filefield"]["tmp_name"] is the temp path of the file its a local file uri. you cannot do anything using javascript.

you can use move_uploaded_file($_FILES["filefield"]["tmp_name"],"local file path");

only from php side not from javascript.