$ 0 0 Changing thevar oldPath = files.profilePic.pathtooldPath = files.profilePic.filepathwill correct the error