Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Rails Amazon S3如何创建文件上载进度条?_Ruby On Rails_Ruby_Ruby On Rails 3_Paperclip_Simple Form - Fatal编程技术网

Ruby on rails Rails Amazon S3如何创建文件上载进度条?

Ruby on rails Rails Amazon S3如何创建文件上载进度条?,ruby-on-rails,ruby,ruby-on-rails-3,paperclip,simple-form,Ruby On Rails,Ruby,Ruby On Rails 3,Paperclip,Simple Form,如何创建一个上载字段,以便在拾取文件后立即上载该文件?上传时有一个不错的状态栏。我使用回形针上传亚马逊S3服务器的图像。我已经看到这个插件了 但我不知道我应该如何使用它 我的表格: <%= simple_form_for @photographer, :url => savenew_admin_photographers_path, :html => { :multipart => true, :method => :post} do |f| %> <%

如何创建一个上载字段,以便在拾取文件后立即上载该文件?上传时有一个不错的状态栏。我使用回形针上传亚马逊S3服务器的图像。我已经看到这个插件了 但我不知道我应该如何使用它

我的表格:

<%= simple_form_for @photographer, :url => savenew_admin_photographers_path, :html => { :multipart => true, :method => :post} do |f| %>
<%= f.label "Upload image" %><br />
<%= f.input :image, :label => '', :required => true %><br />
<%= f.label "Upload flv" %><br />
<%= f.input :flv, :label => '', :required => true %><br />
<%= f.label "Upload Quicktime"  %><br />
<%= f.input :quicktime, :label => '', :required => true %><br />
<%= f.button :submit, :value => 'Create movie' %>
savenew\u admin\u photophers\u path,:html=>{:multipart=>true,:method=>:post}do | f |%>

'',:必选=>true%>

'',:必选=>true%>

'',:必选=>true%>
'创建电影'%>
您应该查看JQuery文件上传程序。我推荐这个:。从那时起,我就在Rails应用程序中使用了它,它完全可以开箱即用,没有任何配置和设置问题。尝试它的演示:在编码之前。最后,您还可以在此处浏览Rails中为相同内容编写的一些代码:


如果你在这方面需要任何帮助。一定要让我知道,因为我刚刚完成这方面的工作,现在有了一个新的背景。但我想,如果你天生有点不听话,你就不需要任何帮助了。

嘿,苏里亚。你能查一下我的密码吗?我目前正在使用jquery文件上传+AmazonS3。在实现AmazonS3之后,我的进度条停止工作。但是,我使用的是jquery文件上传的基本版本,而不是完整的UI。这是我的代码:嘿,Edmund,我已经创建了一个小facebook应用程序,其中包含omniauth和使用carrierwave上传的jQuery文件,也可以使用AmazonS3进行配置。以下是应用程序存储库的路径: