similar to: redirect_to or send_file and AWS S3

Displaying 20 results from an estimated 10000 matches similar to: "redirect_to or send_file and AWS S3"

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
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
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 Apr 05
1
send_file VS. send_data (performance)
Does anybody know if there is a big performance/time cost difference between these two methods of serving a file: ------------------------------- #1 ----------------------------------------- send_file "test.png", :type => ''image/png'', :disposition => ''inline'' ------------------------------- #2------------------------------------------
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'',
2008 Feb 12
3
send_file - PDF
Hi- I''d like to load a PDF file into a page, in my controller: send_file "/path to/my.pdf", :disposition => "inline" However, instead of rendering inline, it asks to download the file. How can I display the contents without downloading? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2007 Feb 27
2
send_file and ZIP files
I have an application which uses send_file to send a ZIP file to the client. This works nicely when it''s run on our development OS-X boxes, using mongrel from script/server, but on our production server, using mongrel behind Apache 2.2. with mod_proxy_balancer, the client gets 1 byte delivered :-( If I use wget -S to the URL in order to see the full headers I see this on
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 =>
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
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
2006 Dec 30
2
Another RSpec on Rails issue: how to test send_file()
Hi! Today I needed to implement some controller code, that uses send_file() to send image data. How can this be tested / specified with RSpec? bye, Tobias
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
2006 Mar 29
1
send_file is behaving strange
Hi all, I am using send_file("/path/to/my/file")to send a file from the server to a client. The file is not empty but when displayed on the client, it is totally blank. In windows system, it''s working properly, the problem is only with a linux server -- Posted via http://www.ruby-forum.com/.
2006 Dec 21
6
Rails'' send_file, Mongrel, and *gasp* memory
I''ve had a right fun few days at work trying to figure out why our Rails app (which isn''t under very heavy load) kept eating memory and bringing our server to our knees. Eventually I traced it to send_file (which was in a way a relief as it wasn''t down to my coding ;) -- every time a user started downloading, the memory consumed by the app would jump, and
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
2006 Jul 12
2
Initializing log4r once
I have a problem init''ing log4r. I have the following initialization code for log4r: Configurator[''logpath''] = ''./config'' # was ''./logs'' Configurator.load_xml_file(''config/log4r_config.xml'') I put it in appliction.rb, but then ofcourse at every request the logger system will be reinitialized. This causes the
2012 Mar 21
2
aws-s3 gem install error- bittorrent.rb
Hello, Am running build install on an existing project and I get this error: Installing aws-s3 (0.6.2) Errno::EACCES: Permission-denied - D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/aws-s3-0.6.2/lib/aws/s3/bittorrent.rb An error occured while installing aws-s3 (0.6.2) and Bundler cannot continue, make sure that gem install aws-s3 -v ''0.6.2'' succeeds before bundling.
2006 Apr 27
4
pdf render inline .... update ''main'' div
Hi, I want to keep the layout and just to a link_to_remote to update the=20 div id ''main'' Using this in the controller action send_file "public/pdf/my.pdf", :type =3D> ''application/pdf'', = :disposition=20 =3D> ''inline'', :stream =3D> false I get this. The raw pdf code sent replacing the main div with :
2007 Jan 06
2
S3 throwing invalid argument using AWS S3 API
Hello, Im using the following amazon web service API for S3 : http://amazon.rubyforge.org/ The problem is that after I establish a connection using establish_connection!, and try using the "store" command, I keep getting the following error. However, if I reboot my webrick server, it works fine for about one hour and then starts throwing this error: Errno::EINVAL in
2010 Apr 12
3
$(link).previous("input[type=hidden]") is undefined
I am getting this error when trying to use the remove link explained in the Railscast: http://railscasts.com/episodes/197-nested-model-form-part-2 error: $(link).previous("input[type=hidden]") is undefined remove_fields()applic...1065175 (line 6) function onclick(event) { remove_fields(this); return false; }()1 (line 2) [Break on this error]