[Zope-DB] Help on uploading images to Postgresql
Bakhtiar A Hamid
kedai@kedai.com.my
Mon, 7 Apr 2003 09:45:53 +0800
> Photo upload Form
> ==============
> <dtml-var standard_html_header><h2><dtml-var title_or_id></h2>
> <form action="uploadPhoto_action" method="post"><table>
> <tr> <td>Person ID:</td>
> <td><input type="text" name="person_id" maxlength="16"
> size="20"></td>
> </tr>
> <tr> <td>Comments:</td>
> <td><input type="text" name="comments" maxlength="20"
> size="20"></td>
> </tr>
> <tr> <td>Filename: </td>
> <td><input type="file" name="pic" accept="image/*">
> </tr>
> <tr><td> </td></tr>
> <tr> <td align="right"><input type="reset" name="submit"
> value="Reset"></td>
> <td><input type="submit" name="submit" value="Upload"></td>
> </tr>
probably you need
enctype="multipart/form-data" in <form >
>
> <dtml-var standard_html_footer>
>
> uploadPhoto_action Method
> ====================
> <dtml-var standard_html_header><h2><dtml-var title_or_id> <dtml-var
> document_title></h2>
> <dtml-call "uploadPhoto_sql (cust_id=REQUEST.get('person_id'),
>
> comments=REQUEST.get('comments'),
> pic=REQUEST.get('pic')
> )"> <dtml-call "RESPONSE.redirect('uploadPhoto_form')">
> <dtml-var standard_html_footer>
>
>
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://mail.zope.org/mailman/listinfo/zope-db