All posts · OIC Integrations

Handling Binary and Large Files in OIC

File handling in OIC goes beyond the simple FTP adapter use case — here's how to handle large files, binary content, Base64 encoding, and chunked processing correctly.

Anurag Jangra · March 12, 2026 · 6 min read · ... views

The file handling challenge in OIC

OIC is designed for message-based integration, not file transfer at scale. Understanding its limitations and working with them — rather than against them — is key to building reliable file-based integrations.

Base64 encoding: why it happens

OIC transmits binary content as Base64-encoded strings inside XML/JSON payloads. This means a 10MB file becomes approximately 13.3MB as Base64. For files over 10MB, this can cause memory pressure and timeout issues.

When to use OIC File Server vs FTP Adapter

OIC File Server (built-in storage): use for staging files between integration steps — write a file in one integration, read it in another. Good for intermediate processing.

FTP/SFTP Adapter: use for actual file exchange with external partners — picking up files from partner FTP drops, delivering files to external destinations.

Chunked file reading — the correct approach

For files with many rows (CSV exports, FBDI files), never read the entire file into memory at once. Use OIC’s read file in segments capability:

  1. Stage the file to OIC File Server
  2. Use a While loop with the Read File action configured in chunk mode
  3. Set chunk size to 500-1000 rows per iteration
  4. Process each chunk through your transformation logic
  5. Write results or call downstream APIs per chunk

Generating files from OIC

To generate a CSV or fixed-width file from OIC data:

  1. Use XSLT to transform your payload into a delimited string
  2. Use the Write File action to write to OIC File Server
  3. Transfer the completed file to destination using FTP Adapter

For complex formats (FBDI templates, EDI), generate the content in PL/SQL and have OIC retrieve the file rather than building the format in XSLT.

Handling encrypted files (PGP)

OIC supports PGP encryption/decryption natively:

  1. Upload PGP public and private keys to OIC Certificate store
  2. In FTP Adapter configuration, specify the PGP certificate
  3. OIC encrypts before sending, decrypts after receiving — automatically

Never pass PGP keys as file content through the integration payload.

Size limits to know

OIC has payload size limits that vary by release but are typically in the range of 10-20MB per message. For larger files, always stage to file storage first and process in chunks. Attempting to pass a 50MB file as a single payload will cause the integration instance to abort.

Think Beyond the Implementation

Questions worth sitting with after reading this

01

Why is this architecture appropriate for this specific context — and where would it be the wrong choice?

02

What assumptions did we make that aren't stated explicitly? What happens if those assumptions are wrong?

03

What would break first if the requirements changed — volume doubled, a third system was added, or the deadline halved?

04

What alternatives did we reject, and why? Was the decision made on evidence — or habit?

AJ
Anurag Jangra
Oracle Cloud PaaS Consultant · OIC & VBCS Specialist

4.5+ years delivering enterprise Oracle Cloud integrations and VBCS applications across manufacturing, IT services, and financial sectors. OCI Certified — writes about real-world OIC, VBCS, SQL, and BI Publisher patterns from production experience.

Chat on WhatsApp