Uploading File in php from ajax post, datatype:Json

910 views javascript

I wanted to insert file into database, How to get file properties like its name, size, type, tmp_name.

enter image description here

From $data, I am able to insert all details such as $code, $brand, $type, $capacity, $customerID etc...

I am unable to fetch file information like its name, size, type, tmp_name. So that I have to insert into database.

I have put my time, working alternative way, that didn't work. Please help.

answered question

You have the global $_FILES property. try to var_dump it to see what info you get. GL

1 Answer


Using $_FILES[''];

for example

$_FILES['Field name of your file']

enter image description here

posted this

Have an answer?


Please login first before posting an answer.