Upload method updated to accept $_FILES file