Passing large BLOBs to Stored Procedure

Viewed 1825

I have a simple (example) script to upload a file into the database (Oracle, if it matters):

<cfscript>
param string filename;

if ( FileExists( filename ) )
{
  result = new StoredProc(
    datasource = "ds",
    procedure  = "FILE_UPLOAD",
    result     = "NA",
    parameters = [
      { value = FileReadBinary( filename ), type = "in", cfsqltype = "CF_SQL_BLOB" }
    ]
  ).execute();
}
</cfscript>

However, the ColdFusion CFML Reference states for FileReadBinary( filepath ):

Note: This action reads the file into a variable in the local Variables scope. It is not intended for use with large files, such as logs, because they can bring down the server.

If I should not use FileReadBinary( filepath ), how should I upload a large (0.5 - 1Tb) file?

2 Answers
Related