使用Uploadify时出现问题

时间:2011-08-25 10:05:33

标签: ruby-on-rails-3 uploadify

我一直在尝试在rails 3.1 app中实现uploadify。我按照提到的步骤here进行了操作。这是我的代码:

{my form code here}
- arr = []
- request.env['HTTP_COOKIE'].each_char{|c| arr.push(c[0].to_s)}
- @session = arr.join("x")
= @sermon_path = sermons_path
:javascript
  $('#sermon_sermon').uploadify({
          uploader: '/uploadify.swf',
          script: '#{@sermon_path}',
          cancelImg: 'cancel.png',
          buttonText: 'Browse',
          auto: true,
          scriptData: { 'session_encoded': '#{@session}'}
  })

这确实显示了uploadify按钮来选择要上传的文件,但是当选择文件时没有任何反应。它甚至不显示上传的文件,也没有响应发送回服务器。 任何帮助都将受到高度赞赏。

1 个答案:

答案 0 :(得分:0)

我更新使用uploadify,除了在php项目中,但可能是其他tutorial可以帮助你。在github上有一个有效的example和一个other,但有了rails 2.3.4,你可以试试这个gem

相关问题