I do not understand why I get this error? I copied exactly from the source code example. I can download all the content, and then when I try to download (by clicking the "Start" button), I get this error.

But even if I get this error, it still loads into my database correctly. When I refresh my page, I have a display page on which the downloaded images will be displayed, and there it is. What causes this problem?
Please, help! I also use paperclip to download. In my environment, I load locally, but during production I load on Amazon S3
This is what my controller looks like when creating or updating a form.
def create @project = Project.new(project_params) respond_to do |format| if @project.save if params[:photos] params[:photos].each { |image| @project.project_images.create(photo: image) } end format.html { redirect_to @project, notice: 'Project was successfully created.' } format.json { render :show, status: :created, location: @project } else format.html { render :new } format.json { render json: @project.errors, status: :unprocessable_entity } end end end def update @project = current_user.projects.find(params[:id]) respond_to do |format| if @project.update(project_params) if params[:photos] params[:photos].each { |image| @project.project_images.create(photo: image) } end format.html { redirect_to @project, notice: 'Project was successfully updated.' } format.json { render :show, status: :ok, location: @project } else format.html { render :edit } format.json { render json: @project.errors, status: :unprocessable_entity } end end end
EDIT:
Here is my form
<%= simple_form_for @project, html: { multipart: true, id: 'fileupload' } do |f| %> <span class="btn btn-success fileinput-button"> <i class="glyphicon glyphicon-plus"></i> <span>Add files...</span> <input type="file" name="photos[]" id='photo_upload_btn', multiple> </span> <button type="submit" class="btn btn-primary start"> <i class="glyphicon glyphicon-upload"></i> <span>Start upload</span> </button> <button type="reset" class="btn btn-warning cancel"> <i class="glyphicon glyphicon-ban-circle"></i> <span>Cancel upload</span> </button> <% end %>
Edit:
JQuery code
<script> $(function () { 'use strict'; </script> <script src="http://blueimp.imtqy.com/JavaScript-Templates/js/tmpl.min.js"></script> <script src="http://blueimp.imtqy.com/JavaScript-Load-Image/js/load-image.all.min.js"></script> <script src="http://blueimp.imtqy.com/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script> <script src="http://blueimp.imtqy.com/Gallery/js/jquery.blueimp-gallery.min.js"></script>
jquery ruby-on-rails ruby-on-rails-4 file-upload
hellomello
source share