Loading ...
Sorry, an error occurred while loading the content.

590RE: Uploading files

Expand Messages
  • Tim Moore
    Jul 15, 2002
    • 0 Attachment
      > -----Original Message-----
      > From: Tim Moore
      > Sent: 15 July 2002 11:05
      > To: 'Josh Chamas'
      > Cc: 'Quentin Smith'; 'asp@...'
      > Subject: RE: Uploading files
      >
      >
      > > -----Original Message-----
      > > From: Josh Chamas [mailto:josh@...]
      > > Sent: 12 July 2002 23:13
      > > To: Tim Moore
      > > Cc: 'Quentin Smith'; 'asp@...'
      > > Subject: Re: Uploading files
      > >
      > >
      > > Tim Moore wrote:
      > > >
      > > > Ah, I spoke to soon. It turns out the code that processes
      > > the data is
      > > > expecting the full MIME multipart/form stuff (this is a
      > > port from an IIS
      > > > app. It decodes the header internally in a bit of C++). So
      > > although I've got
      > > > just the file itself, I need all the MIME header surrounding it.
      > > >
      > > > So I guess this is where CGI.pm comes in? Thing is though I
      > > don't want to
      > > > use CGI to dynamically create the form or write to a temp
      > > file which is what
      > > > the samples seem to do, I just want to get the full data
      > > with MIME headers
      > > > (without CGI breaking it up for me).
      > > >
      > >
      > > CGI.pm is used internally by Apache::ASP to do its file upload
      > > processing. If you look at the Apache::ASP::Request object
      > > you will see how it gets invoked. If you can see a hook into
      > > CGI.pm that we could add to make Apache::ASP work better for you,
      > > please feel free to provide a patch.
      > >
      > > The biggest deficit here that I see is by using CGI.pm for
      > > the processing, we lose access to the raw file upload data
      > > that you need. So, I might consider implementing the file
      > > upload processsing natively in Apache::ASP, but I see that
      > > in being quite a ways off yet. What I think you will find
      > > greater power in here is creating a mod_perl handler for this
      > > special case, so you have access to the file upload directly
      > > from Apache API, and you can do whatever you need to in
      > > this way.
      > >
      > > You could finally consider fixing the C++ that had the
      > > data requirements that it has. This might simplify
      > > things in the long term anyway.
      >
      > Ah, now I understand, so by saying it's done with CGI it
      > doesn't mean the user has to write CGI code just that
      > Apache::ASP uses it internally.
      >
      > Sounds like what I need to do, given I don't have much time
      > to achieve what I have to do, is to change our code to not
      > rely on the extra MIME header information (code split between
      > Windows/IIS which gets that stuff and has to decode it and
      > Unix/Apache which doesn't). I think I can get away without
      > needing the extra info anyway.
      >

      Oh, one question... what happens if you have a multiple file upload in the
      form?

      Not actually sure if that's possible but at a guess the MIME stuff in IIS
      would let you have multiple files under one 'submit'. I think I've seen
      sites that do something like that.

      As through Apache::ASP just seems to return the file itself there would be
      no boundaries to break up the files.

      Not that I need multiple file upload yet but I can see it being added to our
      project at some point.


      Cheers,

      Tim.

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Show all 11 messages in this topic