Displaying 20 results from an estimated 20000 matches similar to: "Send_file and Firefox"
2007 Aug 24
1
How to download any file using send_file() method
HI,
I am directory listing and in that listing I have certain files and sub
directories, now when I click on the files it should download that
particular file but I am not able to accomplish it, and I have got to
use send_file() method.
In the send file Code shown below I have made use of the address of one
of the files directly so when I click the link of any file it downloads
it.
THE CODE
2014 Mar 26
0
Heroku | Rails 4 | Ruby 2.0 - send_file not presenting file for download in the browser
Hello all,
I am have an app that is hosted on heroku (rails 4 | ruby 2.0) that I am using paperclip-dropbox to upload attachments to a blog. I have created a download link for people who read the blog to be able to download the attachments but I am not able to get the file to actually download via the browser. I am curious if anyone knows what could be the issue.
My process is I download the
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
2008 Feb 01
1
problems with link_to_remote and send_file
Hi everyone,
I working on an app that at some point generates an xls report(charts,
summary lines, etc) and sends it to the user.
If i use link_to everything works fine; however when change to
link_to_remote so i can make an ajax call it doesn;t seam to work ( i
do not get the save/open dialog box)
def exp_to_excel_2003
@filepath = "#{RAILS_ROOT}/public/files/Metrics Report.xls"
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)
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 =
2007 Aug 27
1
Send_file() method for downloading any file
HI,
I need to know how to download any file using send_file() method.The
code I have shown below is for a specific file........how ever I need it
for any file.
THE CODE
........
def download_files
send_file(''D:/hr/Handbook.doc'',
:filename => params[:filename] ,
:type => ''application/octet-stream'',
2005 Dec 02
0
send_file method on windows and webrick
I am developing in a windows xp environment running WEBrick and MySQL,
RoR 0.13.1. I am trying to retrieve the file that I uploaded via Rails
using the send_file() method. Instead of returning the file, the file''s
contents are being printed out to the WEBrick console, the browser hangs
for a while, and then an empty file is returned from the download dialog
box (Firefox 1.0.7/IE
2009 Aug 02
3
redirect_to or send_file and AWS S3
Hi,
I store files on S3 as the id of the file in my appliction. IE my file
with id 20 will be stored on S3 as 20. When I download the file I want
to look up the file name in the database and then pass it off to the
user. Is there any way I can use redirect_to and pass the S3 url and
then give it the filename, so the user doesn''t get 20.
Does this make sense?
Thanks,
David
--
Posted
2006 Jul 22
0
form_remote_tag and send_file
All,
I have an existing form that calls an action which in turn creates a PDF
and sends it to the browser using send_file.
I want to change this form to use form_remote_tag so that I can set a
progress bar and once the PDF is finished, the progress bar hides and
the PDF opens.
The send_file data is being sent to the browser, but not displayed
anywhere. When I use a regular form post, it
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
2010 Nov 03
2
send_file but not send_data?
So this is the original code I used, and it worked
send_file ''vendor/sprites/not-found.png'', {:filename =>
"sprite-not-found.png", :type => "image/png", :disposition => "inline"}
Now I switched it to this (going to be adding imageMagick)
send_data File.read(''vendor/sprites/not-found.png''), {: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
2006 Apr 03
0
Making output_compression work with send_file
While working with the newly fixed output compression plugin, one of
the devs in my team discovered that it breaks with send_file(). So if
you are using send_file() in your application you must get the fixed
file I''ve put at: http://devblog.famundo.com/output_compression.rb.
The change is actually in checking for the Content-Disposition header
added by send_file(). See the full writeup
2007 Jan 11
0
Functional tests with actions that send files
I have a number of actions that use the spreadsheet/excel library to
generate an Excel spreadsheet based on model data and send it to the
user using the send_file method.
For a while, I''ve been testing these methods with assert_response
:success, and then checking the response headers to make sure the file
at least looks like what I should be getting. But it occurred to me
recently that
2006 May 31
4
Sending files through send_file or by httpd?
If I were to serve files, would send_file via rails be slow?
I think they will be 200mb avi files.
Would it be better to send them via /public ?
But I would like to track the clicks on each file - which makes me think
that I can''t serve them out on /public as those clicks will not go
through my application.
Any help or suggestions?
--
Posted via http://www.ruby-forum.com/.
2007 Jun 07
6
Can't download files with send_data or send_file
I have a form_remote_tag that calls a method to print out a csv file
for download. If I tell the form_remote_tag to update a div the data
comes up in that div, but otherwise I can''t get the browser to
acknowledge the sent file.
>From view:
<%= form_remote_tag :url => {:action => "csv_dump" }%>
<%= submit_tag "Download Complete List" ,:name
2005 Dec 13
3
send_file doesn't work with Apache?...
Hi,
I''ve been using send_file in my Rails application with
WEBrick happily to send files of various sizes and
kinds.
The same code fails to send anything but a 500 error
when run under Apache, and a log file message
"warning: syswrite for buffered IO".
Looking back through the mailing list archives I see that
there have been send_file bugs in the past. Can some
knowledgeable
2005 Dec 20
0
2005 a send_file odyssey (or Rails and Apache don''t always play well)...
Hi,
I''m developing a Rails application that (amongst other things)
lets users download media files. These files range in size
from a few kilobytes up to several gigabytes.
All this development is taking place with Rails 1.0 on a
Solaris host with Ruby 1.8.2 and Rails mode set to
"development".
I''m using the Rails send_file method to send each file with
these
2006 Sep 29
0
[BUG] send_file header strangeness
When I serve up a gif file using send_file(''file.gif'', :type =>
''image/gif''), for some reason I get
Content-Type: image/gif; charset=utf-8
in my headers. Maybe I''m missing something, but this doesn''t look like
entirely correct behaviour.
--
Piers Cawley <pdcawley@bofh.org.uk>
http://www.bofh.org.uk/