Displaying 17 results from an estimated 17 matches for "upload_fil".
Did you mean:
upload_file
2013 Sep 30
0
TypeError: no implicit conversion of Symbol into Hash when submitting form to upload files
...ly new to Rails and Ruby and I''m trying to learn from my
mistakes, this time I''m trying to upload 2 files from a form for later
processing, however, after I hit the "Submit" button. I keep getting this
error:
TypeError in UploadFilesController#create
app/controllers/upload_files_controller.rb:28:in `new''
app/controllers/upload_files_controller.rb:28:in `create''
Request
Parameters:
{"utf8"=>"✓",
"authenticity_token"=>"2JJGtRXjWCZlPNhQdx6wOW4xvTseiRaXNylnUYvA5v4=",
"upload_files"=>{"inve...
2006 Apr 24
1
Upload Progress Bar not showing
...ce] = "File uploaded sueccessfully."
redirect_to :action => "list"
end
end
end
end
And the ''new'' upload view:
<h3>Upload File</h3>
<%= form_tag_with_upload_progress %>
<p><input type="file" id="upload_file" name="upload[file]"/></p>
<%= render :partial => ''upload_form'' %>
<p><input type="submit" value="Upload…"/></p>
<%= upload_status_tag %>
</form>
<p><%= link_to ''&am...
2010 Apr 24
2
problem using attachment_fu with S3
...db file.
in my model I have
has_attachment :content_type => :image, :storage => :s3, :size =>
0.megabyte..3.megabytes, :resize_to => ''450x450>'', :thumbnails => {
:thumb => ''150x150>'' }
validates_as_attachment
my view new
<h1>New upload_file</h1>
<%= error_messages_for :upload_file %>
<% form_for(:upload_file, :url => upload_files_path, :html => {
:multipart => true }) do |form| %>
<p>
<label for="uploaded_data">Upload a file:</label>
<%= form.file_field :uploaded_dat...
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
2010 Oct 25
0
Rails 3 -NoMethodError (undefined method `original_filename
...uploaded to S3 have the MIME:
application/octet-stream
I''d like to fix that but I''m getting the following error:
NoMethodError (undefined method `original_filename'' for
#<ActiveSupport::HashWithIndifferentAccess:0x107c81998>):
app/models/photo.rb:29:in `upload_file=''
app/controllers/photos_controller.rb:15:in `upload''
app/middleware/flash_session_cookie_middleware.rb:14:in `call''
I think this is because all the tutorials out there aren''t Rails 3
friendly. Anyone have any ideas? Here''s the code:...
2006 Jan 06
4
Upload Progress Bar Problems
I''m writing an application where the user will be uploading many images
and user feedback is essential.
I''ve been trying to get the upload progress bar plug-in to work, but
thus far have not had any success.
I''ve downloaded Sean Treadway''s application code from his site
http://sean.treadway.info/demo/upload/ and I followed the steps in his
Upload
2006 Jul 06
0
big size file uploading problem w/IE
Hi,
I''m now trying to develop application for big files exchanges by
Webserver and Browser with rails.
There is a browser dependent file uploading problem with Rails.
Uploading file is issued from .rhtml like this.
<%= form_tag({:action => "upload_file"}, {:multipart => "true"}) %>
With IE ( 6.02900 ) a 5 meg file was sent but slowly and it took more
than 10 seconds.
With FireFox the same file was sent in 3 seconds or so.
With FireFox a 20 meg file was sent in 9 seconds.
With IE the same file could not be sent.
( for 5 min...
2009 Jan 03
2
Bash cgi upload form
Anyone have a function or script for uploading files from a web
browser with a bash script? I know this is possible to do with Perl,
I'm wondering if the same is possible using only bash.
2008 Dec 08
1
How to upload file by ajax
...:
<% form_remote_tag(:url => { :controller => ''Upload'', :action =>
''uploadFile''},
:update => "result",
:position => :bottom
:html => {:multipart => true} ) do %>
<p><label for="upload_file">Choose file :</label> :
<%= file_field ''upload'', ''datafile'', :size => ''60'' %></p>
<%= submit_tag "Upload" %>
<% end %>
Controller :
def uploadFile
@post = DataFile.save( params...
2006 Jun 01
3
Image corrupted on upload
...'m
baffled as to what''s going on.
What''s even weirder is this same function with the same image works for
my colleague. He is using OS/10 and I am using Windows Media Center.
Any ideas?
#
# destination is the pathname of the target
# file is the source file
#
1 def upload_file(file, destination)
2 File.open(destination, "w") { |f| f.write(file.read) }
3 end
--
Posted via http://www.ruby-forum.com/.
2010 Oct 20
2
How do i use button_to_function
Hii all ,
I am trying to create a button that, when clicked on, calls a
method in a controller . I am thinking that button_to_function is good
to use for that i made htnl viwe like
<h1>File Upload</h1>
<p><label for="upload_file">Select File</label> :
<%= file_field ''upload'', ''datafile'' %></p>
<%= button_to_function "UploadFile","alert(''Hello world!'')"%>
<%=button_to_function ''upload'', remote_fun...
2007 Jan 18
5
Session IDs and SWFUpload
...he upload
URL, but I can''t seem to get Rails to use this _session_id value
(params[:_session_id] instead of the one passed in the HTTP headers.
Is it somehow possible to override the HTTP header cookie _session_id
in favor of one that is passed as a GET parameter, but only for the
upload_file method, so that the authenticated state is still recognized?
Best regards
Peter De Berdt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to...
2010 Mar 29
4
error in uploading file(help me urgnt)
..."wb") { |f| f.write(upload[''datafile''].read) }
end
end
this is ma view file
<h1>File Upload</h1>
<%= start_form_tag ({:action => ''uploadFile''},
:multipart => true) %>
<p><label for="upload_file">Select File</label> :
<%= file_field ''upload'', ''datafile'' %></p>
<%= submit_tag "Upload" %>
<%= end_form_tag %>
This is ma controller
class UploadController < ApplicationController
def index
puts '...
2008 Aug 28
0
How to handle nested and not nested resource in an action's controller?
Hi list,
I don''t know whether the subject is understandable / what i really mean. I
have a model which resources are nested and non-nested (CMIIW). Anyway, my
routes.rb should explain:
map.resources :speeches, :collection => {
:upload_file => :get
}
map.resources :bundles do |bundles|
bundles.resources :speeches
end
How to handle an action in SpeechesController, let''s say, index, for a
different path, /speeches/ and /bundles/1/speeches/ ? Any reference to
understand this area?
Thanks,
Dida
--~--~---------~...
2007 Sep 29
8
Inheritance problem in model
Hello,
I''ve got a problem with the inheritance as soon as I try to use it in a
model.
I''ve got plenty of items which can share a lot of code, so I created a
class "Item", which inherits from ActiveRecord::Base, but because it''s
not a "real item" but an interface, I set it abstract (writing
abstract_class? method).
Then I have all the differents
2009 Nov 17
6
after changed the tag i got the same eror
...g <
frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>
>
> On Nov 17, 5:36 am, malathi selvaraj <malathira...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > Extracted source (around line *#7*):
> >
> > 4: <p><label for="upload_file">Select File</label> :
> > 5: <%= file_field ''upload'', ''datafile'' %></p>
> > 6: <%= submit_tag "Upload" %>
> > 7: <%= end %>
> >
> that should be <% end %>
>
> Fred
>
>...
2013 Oct 10
12
What's the best way to approach reading and parse large XLSX files?
Hello, I''m developing an app that basically, receives a 10MB or less XLSX
files with +30000 rows or so, and another XLSX file with about 200rows, I
have to read one row of the smallest file, look it up on the largest file
and write data from both files to a new one.
I just did a test reading a few rows from the largest file using ROO
(Spreadsheet doesn''t support XSLX and