As the error message says, the parameter to
needs to be a valid URI. The value you've passed in ("127.0.0.1 + ftp/reg.txt") is not
a valid URI.
The URI should look something like:
However, this code doesn't make any sense. You're taking a file from the server, and trying to upload it via FTP to the same location
on the same server