Hi,

I've been working on file uploads this week and it's all working
nicely.

Uriel's going to update the source with my work but in the meantime if
you want to look it my code see

http://www.proweb.co.uk/~matt/werc/cgilib.rc

for the action and there's a wee change to
http://www.proweb.co.uk/~matt/werc/werc.rc to make sure stuff gets
cleaned up if you don't do it yourself.

We've got to go through it and check for variable name clashes and the
like just in case.

Basically it adds processes multipart/form-data the same way as x-www-
form-urlencoded POSTs by adding post_vars_$fieldname and if the
Content-Disposition says it has a filename it also adds  post_vars_
$fieldname_filename for the filename it got saved as in the filesystem
(by default /tmp but you can set upload_dir in werc/etc/initrc.local)

atm. there's no limit on the upload size which is something I need to
look into

By way of exercise (and because it's why I needed it in the first
place) I've made a little site http://ten.steponnopets.net/ (it's a
mirror site hahaha!)

at the moment it is open for anyone to upload stuff there but I'll be
turning that bit off and making it just me

the source code for the site is there too 
http://ten.steponnopets.net/Source_code_for_this

It accepts pdf / doc / rtf / plain documents and converts them to
plain text and makes a summary and posts links to the plain text
version and the original. The conversion depends on some Lunix
programs sadly and the summary uses fold.

All the multipart/form-data upload code is firmly plan9(port)? based
though.

matt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"werc" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/werc9?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to