ars_GetEntryBLOB(ctrl,schema,entry_id,field_id,locType,locFile)locType parameter can be used to specify whether you want
the attachment returned incore (ARS::AR_LOC_BUFFER) or written to a file
(ARS::AR_LOC_FILENAME). If you choose to write it to a file, you must
specify the locFile parameter.
undef.
Example:
ars_GetEntryBLOB($c, "00-Test", "000000000000001",
$fid,
ARS::AR_LOC_FILENAME,
"/tmp/attachtest") ||
die ("GetEntryBLOB: $ars_errstr");
my $a = ars_GetEntryBLOB($c, "00-Test", "000000000000001",
$fid,
ARS::AR_LOC_BUFFER);
die "GetEntryBLOB: $ars_errstr" if(!defined($a));
print "blob size = ".length($a)."\n";
open(FD, ">/tmp/attachtest2") || die "open: $!";
print FD $a;
close(FD);
A subsequent comparison of the two files /tmp/attachtest
and /tmp/attachtest2 should show that they are identical.
Last changes to this page 9th March 1999 by jeff murphy