I can't seem to get that working, best as I try.

Does anyone have other suggestions?

My main problem right now, is that if I upload 'nothing', i get an error of the sort:
can't find Content-Type header


According to the mp1 docs/examples:

        $upload = $apr->upload('fieldname')
        if (!$upload)
        {
                # no upload
        }
        else
        {
                # yay upload
        }

I'm probably interpreting this wrong, but according to the MP2 docs :

        $upload = $apr->upload('fieldname')
        if ( (ref $upload) eq 'Apache::Upload::Error'  )
        {
                # no upload
        }
        else
        {
                # yay upload
        }

Which might work... but in the case that you have a file upload, and click the file button -- but don't select a file, $upload seems to stay a valid upload object -- but performing any Apache::Upload method on it causes a 500 error

Anyone else with a suggestion?  This is killing me.

On Apr 2, 2005, at 10:37 PM, Fred Moyer wrote:

I was doing something similar several months ago where I needed to
validate the incoming data. This may not be what you need but it worked
in my case, and it's likely there is a simpler way to do it. Here's a
link to a question I posted on the apreq-dev list regarding this - hope
it helps.


http://marc.theaimsgroup.com/?l=apreq-dev&m=109150075712271&w=2




Reply via email to