Hey everyone,
I'm working on serveral Embperl scripts that insert and retrive Binary Large
Objects (BLOBs) into/from an Oracle database using DBI.
I'm currently getting the object (in this case an image) with code like this:
my $buffer;
my $data;
($data .= $buffer) while read ($fdat{image}, $buffer, 32768 * 2);
Cgi.pm has a method for figuring out the MIME type of the upload, like this:
$uploadfile = $query->param("upload");
$mime_type = uploadInfo($file)->{'Content-Type'};
Is there a way of doing this with Embperl? If so, that would be great... It
would be silly to have to a) ask the user for the type or b) use CGI.pm beside
Embperl just to get that mime type...
Btw, it's a lot of fun figuring out how to insert binary date from a form to a
database... the man pages, etc for DBI on this aren't too clear. I got it
eventually though.
What's the biggest upload that Embperl can handle? Would it be feasible to
upload 400MB movie clips or such through Embperl to a database? Or what the
webserver run out of memory and die miserably?
When using
$sth->bind_param(1, $data, {ora_type=>113}),
Is there a way to buffer the moving of data between the user's browser and the
database so that it doesn't load a 400MB file into memory?
Thanks everyone,
Wim Kerkhoff, Software Engineer
NetMaster Networking Solutions
wim@netmaster.com
I'm working on serveral Embperl scripts that insert and retrive Binary Large
Objects (BLOBs) into/from an Oracle database using DBI.
I'm currently getting the object (in this case an image) with code like this:
my $buffer;
my $data;
($data .= $buffer) while read ($fdat{image}, $buffer, 32768 * 2);
Cgi.pm has a method for figuring out the MIME type of the upload, like this:
$uploadfile = $query->param("upload");
$mime_type = uploadInfo($file)->{'Content-Type'};
Is there a way of doing this with Embperl? If so, that would be great... It
would be silly to have to a) ask the user for the type or b) use CGI.pm beside
Embperl just to get that mime type...
Btw, it's a lot of fun figuring out how to insert binary date from a form to a
database... the man pages, etc for DBI on this aren't too clear. I got it
eventually though.
What's the biggest upload that Embperl can handle? Would it be feasible to
upload 400MB movie clips or such through Embperl to a database? Or what the
webserver run out of memory and die miserably?
When using
$sth->bind_param(1, $data, {ora_type=>113}),
Is there a way to buffer the moving of data between the user's browser and the
database so that it doesn't load a 400MB file into memory?
Thanks everyone,
Wim Kerkhoff, Software Engineer
NetMaster Networking Solutions
wim@netmaster.com