What I did was simply add a "Upload body from file" button in all of my "add item" pages. In my case, I added a:
in the form for posting, and then added:print "Load from local file:: <input type=file name=fileupload>";
in my main handler (body being the name of the textarea in my form, of course).if ($cgi->param("fileupload")) { my $fh=$cgi->param("fileupload"); my $buff; local $_; $buff.=$_ while sysread($fh,$_,4096); $cgi->param("body",$buff); }
The reason I think this should be added to Perlmonks is the sheer volume of code that gets posted here. The usefulness of uploading your source then, hitting preview and then adding descriptive text is just, well, too useful to ignore :)
So, those that are capable of this mod, think about it. Thank you!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ar0n) Re: File upload during post
by ar0n (Priest) on May 09, 2001 at 09:48 UTC | |
by mr.nick (Chaplain) on May 09, 2001 at 17:03 UTC | |
|
Re: File upload during post
by chromatic (Archbishop) on May 09, 2001 at 22:05 UTC |