1

Railsアプリがあり、この特定のページ(SSLを使用)には、作成された「投稿」用のフォームがあり、投稿に属する画像をアップロードするために使用される別のフォームがあります。

画像形式は次のとおりです。

<%= form_for Image.new, :html => {:multipart => true} do |g| %>
<%= g.text_field :whence, :id => "postWhence"%>
<%= g.file_field :image, :id => "postImage_file_field", multiple: true, name: "image[image]" %>
<%= g.file_field :image, :id =>"postLogo_file_field"%>
<% end %>

:secure => trueとを追加する人を見てきまし:protocol => 'https'たが、フォームの形式が form_for @user, :url => user_path(:secure => true).

私がこれをやろうとしている理由は、実稼働サーバーにデプロイしたときに、画像のアップロードが突然機能しなくなり、ログを確認したときに次のようになったためです。

Filter chain halted as :ensure_proper_protocol rendered or redirected
Completed 302 Found in 2ms (ActiveRecord: 0.0ms)" when I attempted to upload the image.
4

1 に答える 1