Removed additional reduntant steps (authentificating multiple times). Instead of creating the two files and the change the nodeRef(with the uploaded one via RestAPI), I`m now just defining the fileModels.