Other filetype to upload files in terminal

Hello, I would like to open files with other extensions as if they were as plain text ? if I modify the extension by txt it works but it can not be allowed to open other extensions thanks.

and another problem that I have is that I would like to upload files by sftp but after uploading them they do not come out in the nextcloud that I should do? Thank you!!