create_file_node($filename); echo $codename; if($codename=="error") { error_log("could not create file_node in upload.php"); http_response_code(400); exit(0); } move_uploaded_file($file['tmp_name'], "$storage_root/$codename"); http_response_code(200); exit(0); ?>