Hi! I'm trying to import Netscape type bookmark files into a mysql database table using a cgi script, but having a bit of trouble.
I use start_multipart_form to get a file from main program interface, then parse it in a sub called start_import, using HTML::TokeParser to make sure its really a bookmark file, find out how many links and categories it has, and set a few datafields like import date etc. If all is ok, i call another sub called finish_import where I do the inserts.
The script works fine on my home computer, but when I put it up on the server, i get an error from TokeParser at the beginning of finish_import telling me "no such file or directory." In other words, I pass file from main to start_import parse file successfully, then lose file going from start_import to finish_import. Yet I try to do the same thing from main to start and from start to finish.
Main to start I use start_multipart_form and filefield; in start I then get $filename from param(uploaded_file) and feed it to TokeParser; if all is well, I put $filename in a hidden field called uploaded_file and call finish_import; finish import feeds uploaded_file to TokeParser, which then complains as above. I've been working on this for a couple of days now and no dice. (I'm not the fastest worker in the world)
Any ideas?
In reply to passing fileuploads to more than 1 sub by rabbit55
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |