是否可以设置 Zend File Transfer Adapter 的名称、类型、大小?
我想手动设置 Zend_File_Transfer_Adapter_Http
对象的 name
、type
、size
,可以吗?
I want to set name
, type
, size
for the Zend_File_Transfer_Adapter_Http
object manually, is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
绝对地。但你的说法有些混乱。我想你的意思是限制上传文件的类型和大小,因为否则你可以轻松地创建一个名为“sampleFile.ext”的文件,并用特定大小的空格填充内容,我看不到任何东西虽然有用。
从新对象开始:
文件大小验证器:
扩展名验证器:
排除文件扩展名验证器:
要更改文件名,请使用过滤器: Zend_File_Transfer_Http 如何设置上传的文件名
文件验证器的官方参考:http:// Framework.zend.com/manual/1.11/en/zend.file.transfer.validators.html#zend.file.transfer.validators.extension
Absolutely. But there is some confusion in your statement. I suppose you mean to limit the type and size for an uploaded file, because otherwise you could just create a file easily with the name "sampleFile.ext", and fill content with spaces for specific size, I can't see that of anything useful though.
Start with a new object:
File size validators:
Extension validators:
Exclude file extension validators:
To change file name, please use filter: Zend_File_Transfer_Http How to set uploaded file name
Official reference for file validators: http://framework.zend.com/manual/1.11/en/zend.file.transfer.validators.html#zend.file.transfer.validators.extension