|
|
|
|
| 求在Zope中用Python_script上传文件的方法 |
 求在Zope中用Python_script上传文件的方法 - sccat [ 2005-08-17 21:42 | 317 byte(s)]
 Re: 求在Zope中用Python_script上传文件的方法 - dgj [ 2005-08-19 17:41 | 615 byte(s)]
 Re: 求在Zope中用Python_script上传文件的方法 - sccat [ 2005-08-20 08:20 | 9 byte(s)]
 Re: 求在Zope中用Python_script上传文件的方法 - limodou [ 2005-08-18 08:41 | 118 byte(s)]
 Re: 求在Zope中用Python_script上传文件的方法 - sccat [ 2005-08-18 09:25 | 276 byte(s)]
 Re: 求在Zope中用Python_script上传文件的方法 - limodou [ 2005-08-18 11:43 | 181 byte(s)]
|
|
|
|
[Original]
[Print]
[Top]
|
谢谢,看了API也不懂,怎么告诉Zope我的硬盘里面的文件是哪一个?放在Zope的哪个文件夹?
ObjectManager构造器
manage_addFile(id, file="", title="", precondition="", content_type="")
添加一个新文件对象。
采用file文件内容创建一个新文件对象id。
|
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
能不能给个例子啊?
是不是
<FORM ACTION="XXX.ps" METHOD="POST">
<INPUT TYPE="FILE">
然后再Python_script读取啊?
有没有完整一点的例子啊?我是新手.
|
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
我已经好久没弄zope了,记不起来了。你的form不对,应该是:
<FORM ENCTYPE="multipart/form-data" ACTION="fileUpload.py" METHOD=POST>
|
|
|
----
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
<form name="form1" method="post" action="doUpload.py" enctype="multipart/form-data">
<input type="file" name="uploadFile" size="40">
<input type="submit" value="上传">
</form>
doUpload.py:
-----------------------------------------------------------------------
request = container.REQUEST
uploadFile = request.uploadFile
container.uploads.manage_addFile(id="",file=uploadFile)
|
|
|
----
|
|
[Original]
[Print]
[Top]
|
|
|