<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST');
$target_dir = "input/";
$temp = explode(".", $_FILES["file"]["name"]);
$newfilename = time() . '.stl';
move_uploaded_file($_FILES["file"]["tmp_name"], $target_dir . $newfilename);
echo $newfilename;
?>