Upload file via web form & cgi

OK! Having installed ‘acgi dispatcher’, the form basically works.

I want the user to be able to choose a file to upload. So, I have a form input with something like:

But this information is simply missed off from the variables passed to the AppleScript cgi app.

Any idea why, and how I might get around it?

Many thanks,

David

Model: PowerBook G4
AppleScript: 1.9.1
Browser: Safari 85.8.1
Operating System: Mac OS X (10.2.x)

OK, well the simple answer is that the form has to be encoded as “multipart/form-data”

What I thought would happen is that a reference to the file to be uploaded would be passed through to the cgi application. I would then be able to use the URL Access Scripting addition to upload the file.

What actually happens is that the whole file is incorporated into the form data. That makes parsing the form a whole lot more difficult, and the file would have to be written out to a file.

Has anyone done this? I just seem to be answering my own posts!

Many thanks,

David