Hello Madhavi Vangala,
You can just upload the file and then make use of the StringFromFile action in the community commons module to get the contents of the file.
Hope this helps,
Good luck!
you can use Community Commons module
here just pass your .txt file to "stringfromfile" java action , it will return content of txt file as a string