Displaying 20 results from an estimated 10000 matches similar to: "Rails3 Uploading a File over AJAX"
2010 Jun 26
1
Ajax Form with Multipart File Upload in Rails 3.0
How would I achieve this? In Rails 2.x, I would use responds_to_parent,
but it seems quite unsupported now.
What plugins/gems do people use nowadays that would automate
1) targeting form to iframe
2) sending javascript to iframe
3) having the javascript execute another javascript on parent page
Thank you,
Sharkie
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
2006 May 29
3
IFRAME based RJS - responds_to_parent
** File uploads with AJAX mojo **
Respond with RJS to your parent window with a form action targeted to
a hidden IFRAME. Handles all the painful situations like scoping
your JavaScript to your parent window generating the script block for
execution and clearing the IFRAME after execution so the back button
doesn''t re-execute the action.
`plugin install
2007 Nov 09
1
ruby on rails + ajax + iframe image uploader
hi,
I write a page that contain following function:
this site contain a html file upload control, which allow user to upload
image only.
once the image had been uploaded, it will automatic display on the
current page without refresh entire page.
when the image is saved, it will return javascript that embed in a
iframe (which is also in my current page) that can load the image into
my page (
2007 Nov 06
3
Urgent!!!! responds_to_parent error
Hello
I am trying to upload a picture and refrecar layer with
responds_to_parent. I have this form
rhtml
------
<% form_for(photo, :url => {:action => "create", :tID => params[:tID] },
:html => { :multipart => true, :target => "uploadFrame", :id =>
''uploadPhotoForm'' }) do |f| -%>
<tr>
<td>
<div
2006 Jul 11
1
responds_to_parent plugin
Not sure where I can get help with this one but I getting a wierd
behavior out of safari when trying to use the responds to parent
plugin. Basically I have the following in my view:
<div class="rightsidecontentbody">
<%= form_tag({:action => "create"}, {:multipart => "true", :target
=> "frame"}) %>
<form
2007 Feb 27
0
form_remote_for & file uploads
Has anyone successfully gotten Ajax file uploads working using
form_remote_for & attachment_fu? I have seen Sean Treadway''s
responds_to_parent plugin and many other samples available, and they
all seen to statically generate <form> tags. Is there a way to get a
file upload to work using the Rails helpers?
<% form_remote_for(:message, @message, :url =>
2006 Jan 27
0
"AJAX" file uploading
I''m pretty new to actually contributing to a software project outside of
my own. I recently found the need to create an "ajax" uploader and
thought I''d share it with the community.
I write "ajax" because it acts like it''s ajax but we all know that
javascript does not have filesystem access (for good reason) and thus
ajax uploading isn''t
2006 Aug 03
1
Very strange - AJAX is flakey when I uploaded my site
The weirdest thing is happening. I have an ajax uploading call, and
after I uploaded it, every part of the controller will work except the
ajax call.
The Ajax call is to a javascript function that is in one of my js file.
Ive confirmed that the controller runs all the way till the render
:update. Then, there I have:
responds_to_parent do
render
2009 Mar 18
1
Ajax file upload with remote_form_tag
when I tried below, it worked
<form
target="upload_iframe"
action="/profile/validate_charts_file"
id="upload_charts"
method="post"
enctype="multipart/form-data">
<input type="file" name="charts_file" id="filename" />
<input type="button" name="submit"
2008 Jan 01
2
Ajax.Updater from within an IFrame
Hello together.
I''m trying to call an Ajax.Updater from within an IFrame to update an
element in the parent window.
It is working, but I receive an error from Firefox when I do so.
What I want to do is to upload a file, and then after the file has
completed uploading, automatically reload a section of the page with
information about the file to post-process it.
However, AJAX
2007 Nov 05
0
Ajax - attachment_fu - rmagick and iframe
Hello
I am uploading images ajax-attachment_fu-rmagick and an iframe and me
climb correctly, but when I finish the process and the driver will I
redirect_to enc_url I recharge layer ajax. I tried with redirect_to
enc_url :partial => ''m_content'' and redirect_to enc_url, :update =>
''m_content''. But neither I recharge ...
rhtml
------
<% form_for(photo,
2006 May 12
0
draft-proposal for Ajax.History - History/Bookmark handling in Ajax apps
Hi list,
In one of my previous projects I had to satisfy the requirement of handling
browser back- and forward calls within an Ajax application. Thus I didn''t
get an urge to switch the JS part of this project to an other framework like
dojo (which supports Browser history handling out-of-the-box), I had to come
up with an idea of doing this with prototype/scriptaculous.
The arisen
2009 Feb 11
0
remote_form_for file_field strangeness
Does anyone see any problem with this form?
- form_remote_for(Photo.new, :html => {:multipart => true, :target
=> :uploader}) do |f|
.form_element
= f.label :photo
= f.file_field :collateral
= hidden_field_tag :container_id, @shoot.id
= hidden_field_tag :container_type, @shoot.class.name
.form_element
= f.submit ''Add Photos''
The photo has a
2010 Sep 21
7
Ajax CSRF in Rails3
I''m using rails3. It does not seem to check the authenticity_token
when doing a POST using Ajax. I traced this to:
module ActionDispatch
class Request < Rack::Request
.....
def forgery_whitelisted?
get? || xhr? || content_mime_type.nil? || !
content_mime_type.verify_request?
end
end
so you don''t check if its a get? or a xhr? (ie ajax request). Is this
correct?
--
2006 Jan 29
1
Works with iframe, but not ajax... ?!?
Hello all,
I''ve run into trouble attempting to replicate something in ajax that
worked when done with an iframe...
In both cases I have a table inside a div that is being periodically
refreshed every few seconds... The 1st column of each row in the table
contains a link to a DHTML popup menu. I have the popup menu working in
the ajax version.
The problem is that in the ajax version
2012 Mar 04
4
How to retrieve a FileBlob from 'ActionDispatch::Http::UploadedFile' instance?
I have used ''remotipart'' gem to upload files asynchronously to server side.
The instance passed to the server side is of ''UploadedFile'' .
The Rails API mentions all the methods( like read(), open() ) and
attributes for the class, however I am not sure how to retrieve the File
and store it on the database. The documentation hardly says anything.
Googling
2007 Apr 17
0
rflickr: invalid auth token when uploading
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, I''m working on an application which uses rflickr to upload images to
flickr. I''ve generated and cached an auth token as described in the
GETTING STARTED document in the rflickr tree. However, when I call the
API, I receive an error stating "ERR: Invalid auth token (98)". The
extended error is:
XMLRPC::FaultException
2008 Mar 19
6
Back button behavior has changed again in Safari 3.1, after doing a dom update via ajax/RJS
GAH!
Here is the firefox behavior, which is perfect:
1) View page 1
2) Update some text by using link_to_remote or remote_form_for, along
with an RJS replace or replace_html
3) Navigate to page 2
4) Hit back
5) Page was cached with dom updates, note that the page is show in the
same state as it was left
Safari 3.0 behavior
1..4) repeat
5) Page reloads, ending up in the state where it was left
2006 Jun 07
1
Ajax Pan - IFrame
I want to make an IFRAME or some kind of AJax app that will pan an
external page. Also allow for zooming.
Can this be done in Ruby on Rails?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 18
0
Upload a file through an iFrame
Anybody here have any experience uploading a file via a hidden iframe for
that "ajax fresh good feel"? Previously I was using the plugin
form_remote_plugin (http://svn.kylemaxwell.com/form_remote_upload/trunk/)
which was working like a dream until our sys admin updated rails to 1.1.2.
I''ve made a form that can submit the file to an iframe, but now I''m having
trouble