Is it possible in Rails3, to have a multipart form => true & use remote => true

前端 未结 2 1279
一个人的身影
一个人的身影 2021-01-04 06:36

I\'m using the following form tag for @jobs which have job_photos included.

<% form_for @jobs, :html => { :multipart => true }, :remote => true d         


        
相关标签:
2条回答
  • 2021-01-04 07:18

    The thing is that you cannot post a multipart form via AJAX. This is not a rails' limitation. In order to circumvent this, you need to use an iframe technique (which can be easier with responds_to_parent plugin) or use a technology like Flash or Silverlight.

    0 讨论(0)
  • 2021-01-04 07:20

    You can use Remotipart gem for file uploads with remote => true.

    0 讨论(0)
提交回复
热议问题