Skip to content
Danial Farid edited this page Apr 23, 2015 · 7 revisions

Contributed by PhilCowart

Upload.upload({
    url: 'api/upload-image.php', 
    headers: {'Content-Type': file.type},
    method: 'POST',
    data: file,
    file: file, 
})
  $filename = $_FILES['file']['name'];
  $destination = '../assets/img/users/' . $filename;
  move_uploaded_file( $_FILES['file']['tmp_name'] , $destination );
Clone this wiki locally