how to upload a file directly to other node or any similar ways to achieve it
(1) The remote node needs to pin the file added to the local node (manual node job).
(2) Remote login to the remote node (e.g. with ssh) and upload+pin the file there.
(3) Auto-pin with ipfs-cluster comprising both nodes: https://dist.ipfs.io/#ipfs-cluster-ctl
If the http gateway is writeable, then you can post directly to it via curl -X POST or similar.