make newData work
add code in uploadFile