in reply to Writing binary data directly to webpage

In addition to chromatic's comment,

you might want to store MIME types along with the binary objects.

  • Comment on Re: Writing binary data directly to webpage

Replies are listed 'Best First'.
Re: Re: Writing binary data directly to webpage
by clscott (Friar) on Sep 27, 2003 at 02:29 UTC
    In addition to dmitri's comment, You can get the mimetype during upload via:
    my $q = CGI->new; my $filename = $q->param('file_field_name'); my $metadata = $q->fileInfo($filename); my $mimetype = $metadata->{'Content-Type'};
    As documented in the CGI.pm module --
    Clayton