add duplicate test
use FormData API to set file in $_FILES['file']