Re: uploading file with python script (problem with it)
Hi, Hans de Wit, I think there is something wrong with your form. To upload file, the form should specify "enctype" attr to "multipart/form-data". Like this: <form action="addFile" method="post" enctype="multipart/form-data">... Simon Wang ---- Original Message -------- From: "Hans de Wit" <hw@scp.nl> <mailto:hw@scp.nl> Organization: Sociaal & Cultureel Planbureau To: zope@zope.org <mailto:zope@zope.org> Date: Wed, 14 Mar 2001 17:20:06 MET Reply-to: hw@scp.nl <mailto:hw@scp.nl> Subject: [Zope] Newbie: uploading file with python script (problem with it) Hello, I have a problem uploading files via a form and a python script. The content of the uploaded file after uploading it is only a string, ie the name of the file, not the file itself. I followed the guestbook example of the Zopebook. This is the receiving Python script. # create a unique file id id='entry_%d' % len(context.objectIds()) # create the file afile=context.REQUEST['afilename'] context.manage_addProduct['OFSP'].manage_addFile(id,afile) *** afilename is a field on the form the "sending" form: <form action="addFile"> Add file:<input type="file" name="afilename:string" size="30"><br> <input type="submit" value="upload"> </form> Thanks for any advice
Hi, I just wanted to install Zope (I tried 2.2.5 an 3.0) on my win 2000 as a service, but without success :-( Installation completed normally, but if I try to reach the site "http://localhost:8080/mange" I do not get it!!! What could be my problem? If I try to stop the service and run the start.bat manually, the procedure in the dos windows stopps after: D:\Programme\WebSite>"D:\Programme\WebSite\bin\python.exe" "D:\Programme\WebSite \z2.py" -D ... and nothing more happens ... :-( Perhaps someone is able to help ... thanx a lot ... Marc
Is the service started? ----- Original Message ----- From: "Marc Fischer" <marcbpc@gmx.de> To: <zope@zope.org> Sent: Thursday, March 15, 2001 11:12 AM Subject: [Zope] Installation Probs
Hi,
I just wanted to install Zope (I tried 2.2.5 an 3.0) on my win 2000 as a service, but without success :-(
Installation completed normally, but if I try to reach the site "http://localhost:8080/mange" I do not get it!!!
What could be my problem? If I try to stop the service and run the start.bat manually, the procedure in the dos windows stopps after:
D:\Programme\WebSite>"D:\Programme\WebSite\bin\python.exe" "D:\Programme\WebSite \z2.py" -D
... and nothing more happens ... :-(
Perhaps someone is able to help ... thanx a lot ...
Marc
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
sure !
-----Ursprüngliche Nachricht----- Von: Chris McDonough [mailto:chrism@digicool.com] Gesendet: Donnerstag, 15. März 2001 21:01 An: Marc Fischer; zope@zope.org Betreff: Re: [Zope] Installation Probs
Is the service started?
----- Original Message ----- From: "Marc Fischer" <marcbpc@gmx.de> To: <zope@zope.org> Sent: Thursday, March 15, 2001 11:12 AM Subject: [Zope] Installation Probs
Hi,
I just wanted to install Zope (I tried 2.2.5 an 3.0) on my win 2000 as a service, but without success :-(
Installation completed normally, but if I try to reach the site "http://localhost:8080/mange" I do not get it!!!
What could be my problem? If I try to stop the service and run the start.bat manually, the procedure in the dos windows stopps after:
D:\Programme\WebSite>"D:\Programme\WebSite\bin\python.exe" "D:\Programme\WebSite \z2.py" -D
... and nothing more happens ... :-(
Perhaps someone is able to help ... thanx a lot ...
Marc
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
When you try to visit the manage method in the browser (via http://localhost:8080/manage), what do you get? Does the browser give an error? or do you get a page you don't expect to get? ----- Original Message ----- From: "Marc Fischer" <marcbpc@gmx.de> To: <zope@zope.org> Sent: Thursday, March 15, 2001 4:52 PM Subject: AW: [Zope] Installation Probs
sure !
-----Ursprüngliche Nachricht----- Von: Chris McDonough [mailto:chrism@digicool.com] Gesendet: Donnerstag, 15. März 2001 21:01 An: Marc Fischer; zope@zope.org Betreff: Re: [Zope] Installation Probs
Is the service started?
----- Original Message ----- From: "Marc Fischer" <marcbpc@gmx.de> To: <zope@zope.org> Sent: Thursday, March 15, 2001 11:12 AM Subject: [Zope] Installation Probs
Hi,
I just wanted to install Zope (I tried 2.2.5 an 3.0) on my win 2000 as a service, but without success :-(
Installation completed normally, but if I try to reach the site "http://localhost:8080/mange" I do not get it!!!
What could be my problem? If I try to stop the service and run the start.bat manually, the procedure in the dos windows stopps after:
D:\Programme\WebSite>"D:\Programme\WebSite\bin\python.exe" "D:\Programme\WebSite \z2.py" -D
... and nothing more happens ... :-(
Perhaps someone is able to help ... thanx a lot ...
Marc
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I get the same error as if I try to reach http://kjkjkjkjsdfhjhj.com :-) I hoped to get another page ...
-----Ursprüngliche Nachricht----- Von: Chris McDonough [mailto:chrism@digicool.com] Gesendet: Donnerstag, 15. März 2001 23:19 An: Marc Fischer; zope@zope.org Betreff: Re: [Zope] Installation Probs
When you try to visit the manage method in the browser (via http://localhost:8080/manage), what do you get? Does the browser give an error? or do you get a page you don't expect to get?
----- Original Message ----- From: "Marc Fischer" <marcbpc@gmx.de> To: <zope@zope.org> Sent: Thursday, March 15, 2001 4:52 PM Subject: AW: [Zope] Installation Probs
sure !
-----Ursprüngliche Nachricht----- Von: Chris McDonough [mailto:chrism@digicool.com] Gesendet: Donnerstag, 15. März 2001 21:01 An: Marc Fischer; zope@zope.org Betreff: Re: [Zope] Installation Probs
Is the service started?
----- Original Message ----- From: "Marc Fischer" <marcbpc@gmx.de> To: <zope@zope.org> Sent: Thursday, March 15, 2001 11:12 AM Subject: [Zope] Installation Probs
Hi,
I just wanted to install Zope (I tried 2.2.5 an 3.0) on my win 2000 as a service, but without success :-(
Installation completed normally, but if I try to reach the site "http://localhost:8080/mange" I do not get it!!!
What could be my problem? If I try to stop the service and run the start.bat manually, the procedure in the dos windows stopps after:
D:\Programme\WebSite>"D:\Programme\WebSite\bin\python.exe" "D:\Programme\WebSite \z2.py" -D
... and nothing more happens ... :-(
Perhaps someone is able to help ... thanx a lot ...
Marc
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Chris McDonough -
Marc Fischer -
Wang Haifeng