icache
asked on
File Upload With <INPUT TYPE="FILE"
How do you handle a file being uploaded from the browser's machine with the html form element <INPUT TYPE
Are you prepared to program Perl to do this?
ASKER
Got the Llama book next to me, we're prepared....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm afraid that works on text files only, doesn't it?
You need some extra processing to handle encoded binary data.
You need some extra processing to handle encoded binary data.
No. It works on binary files as well. (At least I have had no problems so far!).
ASKER
You've stated that the file's contents will be in the the variable of the element $in('file'}. What I'm getting as the content of that element is just the file's name, not the contents. I haven't had a chance to install cgi-bin.pl and give your suggestion a try, but does cgi-bin.pl findthe contents in that element while stdin alone cannot
Actually it should be in $in{'upfile'} since that is the name of the <input type="file" input field.
Are you sure you used the correct 'enctype'?
Interpretation of stdin without cgi-bin.pl can be quite complex. I suggest you load a copy of cgi-bin.pl.
Another possible problem could be that ISTR that Microsoft IE does not support the input type="file". (I have not checked this recently).
Are you sure you used the correct 'enctype'?
Interpretation of stdin without cgi-bin.pl can be quite complex. I suggest you load a copy of cgi-bin.pl.
Another possible problem could be that ISTR that Microsoft IE does not support the input type="file". (I have not checked this recently).