I'm trying to write a cgitask script (the one I was having problems with before - but that was a different reason - and resolved) - that should do a number of different things -- I'm trying to avoid having back-to-back-to-back cgitasks in my workflow.
I've written CGI scripts which call themselves multiple times and do different things based upon state which is passed forward in terms of form variables -- and I always pass all the existing form variables as hidden items so that I don't lose things like task_id, etc.
This is the first time I've tried to deal with a script that does file uploading - and the specification for that requires:<form name="..." enctype="multipart/form-data" method="post" action="...">Apparently, when you use a multipart/form-data form, you don't seem to get the form data passed - instead [from link]:The data transmitted from the browser to the server for this example form has two parts. The first contains the value for the name field, and the second contains the name and contents of the specified file:-----------------------------6099238414674
Content-Disposition: form-data; name="the_name"
One line of text field contents
-----------------------------6099238414674
Content-Disposition: form-data; name="fav_file"; filename="abc"
First line of file
...
Last line of file
-----------------------------6099238414674--
So - how the heck am I supposed to iterate through this script to pick up files and maintain existing state [form variables] information to then proceed with processing as-if it was any other kind of cgitask script?
Ideas? Has anyone else done something like this in a workflow cgitask script?
I always have a suspicion that it's real easy as soon as you understand "one thing" [thanks Curly ;-)] - but it's getting to know what that "one thing" is that takes a heck of a lot of time ...
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com