RSA is only able to encrypt data to a maximum amount of your key size (2048 bits = 256 bytes) minus padding / header data (11 bytes for PKCS#1 v1.5 padding).
As a result it is often not possible to encrypt files with RSA directly. RSA is also not meant for this purpose. If you want to encrypt more data, you can use something like:
Generate a 256-bit random keystring K Encrypt your data with AES-CBC with K Encrypt K with RSA Send both to the other side
Of course you can use another key-size, symmetric algorithm and cipher mode, but you get the gist.