在 kohana 3 中实现 uploadify
我很难在 kohana 3 中实现 uploadify,我应该对原始 uploadify.php 进行哪些更改?仅将其设为控制器中的索引函数不起作用并返回 500 错误。
谢谢你!
I have a hard time implementing uploadify inside kohana 3, what changes should I make to the originial uploadify.php? just making it the index function in a controller doesn't work and returns a 500 error.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不太确定这是否有帮助,但前几天我花了很多时间处理 uploadify,其中一个技巧是返回上传控制器的任何响应,让 uploadify 知道上传已完成。
解决方案就像这样简单:
但是,500 状态表示间隔服务器错误,因此这种情况也可能在初始化 uploadify 时使用“scriptData”参数传递会话 ID,如下所示:
希望这会有所帮助,干杯!
I'm not too sure if this will help, but I spent many hours dealing with uploadify the other day, and one of the tricks was to give back ANY response from the upload controller to let uploadify know that uploading is done.
Solution as simply as this:
However, 500 states for interval server error, so the case might be also passing session ID with the 'scriptData' parameter when initializing uploadify, like this:
Hope this helps, cheers!
您使用的是 Uploadify 2.1.x 还是 3.0 beta?
不管怎样,只要你在 javascript 中相应地设置参数,你就应该能够使用你想要的任何控制器。并确保您没有使用处理文件上传的控制器模板。
例如,如果您在 URI /site/files/uploadify 处有一个控制器“files”和一个操作“uploadify”,您应该将参数设置为如下所示:
Are you using Uploadify 2.1.x or 3.0 beta?
Anyway, you should be able to use any controller you want as long as you set the parameters in the javascript accordingly. And make sure you're not using a template for the controller dealing with the file uploads.
For instance, if you have a controller "files" and an action "uploadify" at URI /site/files/uploadify you should set the parameter to something like this: