similar to: file opening and ajaxing

Displaying 20 results from an estimated 50000 matches similar to: "file opening and ajaxing"

2007 Feb 22
0
error with send_file.. please help me...
Ben wrote: > API is your friend. > http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000091 > send_file I put this code block in files_controller.rb def send_file(path, options = {}) #:doc: raise MissingFile, "Cannot read file #{path}" unless File.file?(path) and File.readable?(path) options[:length] ||= File.size(path)
2009 Mar 26
2
send_file using AJAX
I have a AJAX based form and when I use send_file there is no pop-up that appears to prompt user to download file... how do I fix this? Regards, Sudhindra -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email
2007 Jan 08
1
delete a file from the server
Hi all, i want to create a vcs file. when i am creating the vcs file it is getting creatd in the server as well as in the local drive. But i dont want to the vcs file to be saved in the serve. when i am trying to delete the file from the server it is throwing the error,"Cannot start Microsoft Outlook.Cannot import vCalendar file". here is the code that i am using. def vcs f =
2012 May 31
2
send_data/send_file does not open a save as dialog box
Hello, We are using JRuby 1.5.1/ruby 1.8.7/Rails 2.3.8 with a GWT front end. I''m having an issue when attempting to send a server side .csv file to the user using rails send_file. my code is: send_file(path_to_file, type=>''text/csv'') While this is returning fine with an http status of 200, the client side save as dialog is never opening for the user to receive
2006 Apr 13
0
Making @headers[''Refresh''] and send_file work together?
I''ve got a Rails 1.1 app where people can click a link to download a custom-generated file. The link to "Download Zip" goes to / controller/get_zip. That action looks like this: def get_zip @cart = find_cart ids = Array.new @cart.songs.each do |song| ids.push song.id end args = ids.join(" ") zipfile =
2011 Jan 13
2
send_file works on Rails2,SSL - except for IE7/6
Quirky stuff here, The current setup works fine for Firefox 3.6 and IE 8 but balks on earlier IEs. The files are PDFs, .doc files, and other binaries but up to several MB: A. the users'' problem is a minor IE7 quirk: it works to download files from clicking links, but if you use the URL instead then the browser stops after a fraction of a second. Refreshing or hitting Return again
2007 Aug 27
2
send_file : downloaded file cannot be open after upload OK
I easily implemented the upload , using the ''attachment_fu'' plugin... I can see and open the uploaded files (a pdf file 60k and a jpeg images 28k) now I try to implement the download action in my document_controller, I wrote : def download @document = Document.find(params[:id]) send_file(@document.full_filename, :filename =>
2006 Aug 08
2
send_file problem
I''m attempting to use send_file to send an image file from public/images. The file is world readable. I keep getting the following error: A ActionController::MissingFile occurred in account#current_logo: Cannot read file public/images/logo.png /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/streaming.rb:55:in `send_file'' I''ve tried supplying
2009 Mar 26
2
Deleting files after they are sent via send_file
Hello guys, I am having the option to download certain folders on my app in zip format. So every time a user requests one I''m doing a system call to zip the folder (ex: system(''cd ''+path+'' && zip ...) and then the send_file method to send it. What happens is that I''m keeping track of disk space so I need to delete the zip immediately. I was
2007 Apr 23
4
send_file pdf problem
Hi, I am using send_file to allow users to download files from my website, please see code beloe: def download_document send_file("#{RAILS_ROOT}/public/test_form.pdf", :filename => "test.pdf", :type => ''application/pdf'', :disposition => ''attachment'', :streaming
2009 Jun 14
5
Partials views and instance variables go nil
Hi everyone! Model: http://pastie.org/511290 Controller: http://pastie.org/511285 View new: http://pastie.org/511286 View _form: http://pastie.org/511284 When I hit submit button there''s an error for usuarios(users in portuguese) instance. It does not seems to save usuarios even though it seems to be posted by the form. Error: http://pastie.org/511292 Need some help here guys plz --
2006 Jul 07
3
Send a 30 Second Clip of an mp3
On my site I''m allowing users to upload songs in mp3 format. Members can download the full song, but on public pages I would like to use a flash player to play a 30 second clip of the song and/or allow downloading of a 30 second mp3 snippet. The songs are stored above the web root directory, and I use the send_file method for the full file downloads for members. My question is,
2004 Dec 20
1
HP-UX/AIX sendfile patches.
I have a fix for the sendfile.c code for HP-UX - length not properly specified prior to call. I've also added code to support the AIX send_file() function and configure.in code to check for AIX specific send_file API and sets AIX_SENDFILE_API if successful. Could you consider this patch for 3.0.11? I also sent a web/cgi.c patch for "struct var" last week with respect to compile
2005 Nov 29
0
Ajax and Rails to manage long running server process (and file download)?
Hi, I have a Rails application running where clients can initiate through their browsers fairly long-running server processes. At the end of the long-running server process the results are downloaded as a separate file. Currently I''m handling this via "refresh" HTTP headers in the various pages and a Rails send_file() call when the process is complete. I''d like to
2006 Nov 30
3
Strange send_file problem
Or perhaps I am stumbling in newbie fashion (tho I have active_merchant and a store site basically up and running in development mode - still I don''t feel I always understand what is going on.) So, when I have send_file(filename, :type => ''application/x-zip'') redirect :action => index the send_file seems to hang, rather than complete. I''m deducing
2006 May 14
3
send_file and locking files after download?
Hello, I''m working on a download service which grants users a one-time-download access to files. The idea is to write an entry to a database table after a successful download that "locks" the download link for the user. After doing some quick tests with send_file I noticed that send_file does not block until the user has downloaded the full file, but proceeds with the
2008 Aug 19
1
Re: autocad 2008 and wine
raja_s_patil wrote: > Thanks for speedy reply, > > > > > > > > > It seems that Autocad 2008 is successfully running > > > > > > Can u post the final step by step procedure > > > so that others also can follow u. > > > > > > Thanks and Best Regards :) > > > > > > > > >
2007 Nov 07
2
Setting headers in sent_file response
I''m having trouble playing a video from my site on the iphone using send_file. It seems that I''m missing the Accept-Ranges header in my response. How can I set the Accept-Ranges header in my send_file response? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2008 May 09
1
csv file transfer with form_remote_tag?
Good morning! I have a case where I need to build a csv file from my model and allow a user to download/save that file. I''ve got this all working with non-Ajax forms, but the generation of the csv file can take quite a bit of time, so I want to provide a busy indicator for my user. So I tried the following in my view: <% form_remote_tag ( :url =>{:action =>
2007 Aug 07
3
XSendFile problem
I am trying to user XSendFile in my application. I have installed the plugin and in the environment.rb included this line XSendFile::Plugin.replace_send_file! but it is unable to read the files. Earlier i had used send_file but it increases the mongrel size and slows down the application. Any suggestions about how to make it work? -- Posted via http://www.ruby-forum.com/.