Questions tagged [remotipart]

The Remotipart gem enables AJAX file-upload capability to remote forms in Rails 3 apps by extending the native jquery-ujs functionality.

The Remotipart gem enables AJAX file-upload capability to remote forms in Rails 3 apps by extending the native jquery-ujs functionality.

The Remotipart gem does two things:

  1. When non-blank file input fields are detected in a form, remotipart.js hijacks the remote form submission, and instead submits the form using via form.js’s .ajaxSubmit() function, which uses iFrame technique described in the last article.
  2. Remotipart provides the remotipart_response block method in our response js.erb views. This method first checks to see if the form was hijacked by Remotipart and was thus submitted in an iFrame, and if so, it returns our generated JS inside a textarea element, so that it automatically gets executed in our parent window.
37 questions
1
vote
1 answer

Remotipart file upload giving NaN as response code

I am using remotipart to upload a file with ajax in my rails app. I am using the jquery-ujs Ajax "global" events ajax:success and ajax:error in my javascript to trigger code on success or failure. The problem is that the error callback is always…
jackflannery
  • 133
  • 2
  • 10
1
vote
1 answer

Ruby on Rails file uploading using a form with remote: true

I am trying to upload files using a Rails form where the remote is set to true. I'm using Rails 4.1.1. Let's say that my model is a Message, and it is using JavaScript so that the user could easily send multiple messages without reloading the page.…
mpartan
  • 1,296
  • 1
  • 14
  • 30
1
vote
0 answers

Upload file asynchronously using remotipart on drag and drop

I have my own implementation of text editor and would like to allow users to upload files by dragging and dropping it to the text editor. The editor uses iframe. I am using rails and remotipart to do async upload of image files. I tried using this…
Varun Jain
  • 1,901
  • 7
  • 33
  • 66
1
vote
1 answer

Ajax file upload with Remotipart works on development, 406 on heroku

I have a series of remote forms on a page, each of which should be able to upload a file when the object is updated or created. I've checked and tested thoroughly in development, and as long as I'm using Remotipart this seems to work just…
1
vote
0 answers

rails Remotipart form with Firefox doesn't work

I have this form, which submits well on Safari and Chrome but not in Firefox : <%= form_for @user, :remote=> true, :html => { :id => "upload_avatar" , :multipart => true} do |f| %> <%= hidden_field_tag :delete_avatar_pic%> <%= f.file_field :avatar,…
Jercoh
  • 103
  • 2
  • 7
1
vote
2 answers

Remotipart JS Not Executing

I have a form that needs to submit a .csv file to the server and then append the words in it to a textarea in my page. I am using Remotipart to upload the .csv using AJAX but I cannot get the javascript in the server response to execute. Here are…
Xylude Xaalud
  • 388
  • 1
  • 4
  • 11
1
vote
1 answer

Remotipart is changing the action from PUT to GET

I have a story model that serves as a wrapper for many posts. Posts may have photo attachments, and I use remotipart and paperclip to handle the image uploading and processing. This works perfectly fine when a user POSTS a new post. I want to allow…
chuck w
  • 1,741
  • 2
  • 15
  • 34
1
vote
1 answer

Remotipart getting ajax response

i am using Remotipart to upload files. The Rails-Controller handles the file but i cant figure out how to get the following ajax response. Here is my js code. $file.children(".description").html( '<%= form_for FileObject.new, :url =>…
Nico
  • 105
  • 1
  • 9
1
vote
0 answers

AJAX file upload using Remotipart and Carrierwave

I have a model that has an icon associated to it. This icon upload is managed by Carrierwave. My issue arises when I try to send the file via ajax from my form. My Model is as follows: class Category < ActiveRecord::Base attr_accessible :name, …
robinjohnobrien
  • 1,092
  • 2
  • 11
  • 19
1
vote
1 answer

Rails 3 remote link click triggers different request on second click

I have a Rails app that was working well until I upgraded ruby, rubygems, and my gems. Almost all of my links are remote links. When I make the first request by clicking on one of these links, Fancybox is triggered and opens the new content…
David R
  • 328
  • 1
  • 15
1
vote
2 answers

ajax fileupload through rails remotipart gem

I have been trying to upload images through remotipart and carrierwave. Simply fileupload is working fine, I have also installed remotipart gem which enables file upload through ajax.Now the issue is how to send the file through ajax(I mean the…
Sachin Prasad
  • 5,365
  • 12
  • 54
  • 101
0
votes
1 answer

how to manually include remotipart js?

I need to conditionally use the remotipart gem. The [docs][1] say just add it to application.js: //= require jquery.remotipart But I don't want it to be included with every single view, instead I want to conditionally include it, however when I…
user1130176
  • 1,772
  • 1
  • 23
  • 33
0
votes
1 answer

Image upload in Ruby on Rails using remotipart gem and Paperclip

I am having a form submit in which the user can be able to choose multiple images( choosing one by one ) not multiple enabled in file field. When the user chooses the image I will add an image tag for image preview and hidden file field for each of…
Aarthi
  • 1,451
  • 15
  • 39
0
votes
1 answer

Remotipart ( + Carrierwave) not uploading files nor using ajax

I've spent a week right now trying to get this to work, reading as much as I can about remotipart, and trying to set it right, but I have failed miserably. I have form which has a title, description, an audio file and an image file. If I submit the…
0
votes
2 answers

Rails unknown format on AJAX

I'm trying to implement a very simple file form using the remotipart gem. Most of my files are the exact same as the tutorial ones: timeline.html.erb : <%= form_tag new_feed_path(:format => "js"), remote: true, :html => { :multipart => true } do |f|…
Pierre Olivier Tran
  • 817
  • 1
  • 7
  • 15