Displaying 20 results from an estimated 600 matches similar to: "Rails 3 -NoMethodError (undefined method `original_filename"
2010 Mar 25
2
NoMethodError (private method `chomp' called for nil:NilClas
Hi:
I am using Rails 2.3.5 with paperclip, mime-types and uploadify. So far
the application is working in development environment. But when I
switched to the production environment, it produced the following error.
NoMethodError (private method `chomp'' called for nil:NilClass):
/usr/lib/ruby/gems/1.8/gems/mime-types-1.16/lib/mime/types.rb:665:in
`type_for''
2006 Apr 24
1
Upload Progress Bar not showing
Hi. I''m setting up an upload form for internal users of a Rails site,
and I''m trying to use the Upload Progress Bar plugin from
http://sean.treadway.info/demo/upload/. I followed the directions as set
out in the Rails Wiki
(http://wiki.rubyonrails.org/rails/pages/Upload+Progress+Bar).
Basically the problem is no progress bar or any upload information shows
up. In WEBrick, I
2013 Sep 30
0
TypeError: no implicit conversion of Symbol into Hash when submitting form to upload files
I''m currently 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''
2012 Nov 12
1
undefined method `original_filename' for nil:NilClass
Hi, although I saw this problem in other blogs, I couldn''t make it works.
My view:
*<%= semantic_form_for :routes_status_race, :url =>
status_race_admin_routes_path do |f| %>*
* <% contact_array = Contact.all.map {|contact| [contact.name,
contact.id]}%>*
* <% route_importer_array = RouteImporter.all.map {|importer|
[importer.name, importer.id]}%>*
* <%=
2011 Jul 07
0
Question of uploading large file using carrierwave, uploadify and nginx upload module
Hey ROR users,
I have a small experimental web app which is for uploading files. The
web app uses carrierwave, uploadify. It works fine on small size
files. However, it can not handle large size files (>1G) efficiently.
Then I decided using nginx upload module, it worked well on small size
files after modification of codes,. But It fails on uploading large
files (>1G) because of http error
2010 Sep 21
0
Upload form with uploadify jquery plugin
I would like to integrate the uploadify plugin with a standard rails
form. However I can''t figure out how to add a new field and have it get
submitted with the file upload. I added a name field into the form, but
the valued does not get submitted.
<%
dialog_file_description = ''Photos''
allowed_extensions = [:jpg, :jpeg, :gif, :png]
max_size = 20.megabyte
2007 Jul 05
2
undefined method `original_filename' for "random.jpg":String
I have a problem getting attachments to work in a specific case...
I have the following data model (this is a relevant subset of it):
- a log can have many journals
- a journal belongs to a log and can have many attachments
- an attachment belongs to a journal
When adding on a new journal to an existing log the new journal form and
the corresponding controller handle the attachment as well and
2010 Mar 04
0
Uploadify authentication problem
I''m trying to use Uploadify in my project. Everything works in my
machine, locally. The problem is when I use the same code in my
production environment.
When I try to upload a photo, it returns an error "HTTP 401", but there
are no errors in the log.
Rails(2.3.5)
Uploadify(2.1.0)
Here is my FlashSessionCookieMiddleware where the problem with the Flash
authentication shoud be
2010 Mar 29
4
error in uploading file(help me urgnt)
when i tried to crate an upload file application in rails i am getting
error like this
Template is missing
Missing template app\views\upload\uploadfile.html.erb in view path
app/views
this is ma model
class DataFile < ActiveRecord::Base
def self.save(upload)
name = upload[''datafile''].original_filename
directory = "public/data"
# create the
2010 Apr 24
2
problem using attachment_fu with S3
Hi,
My S3 bucket is located in the US
I have attachment_fu working when using file system storage
I have sw-swf upload plugin working with my S3 account
but I can not get attachment_fu to work with S3 storage.
the error I get is :
AWS::S3::RequestTimeout in Upload filesController#create
Your socket connection to the server was not read from or written to
within the timeout period. Idle
2010 Oct 30
0
Will_Paginate — Set the Starting record ? IE, Photo 3, of 8
Hello. I''m working very hard to build projects > photo_albums > Photos
But am Stuck on being able to implement it.
Desired User Flow...
#1 - User clicks their project
#2 - User sees a list of photo albums
#3 - Users clicks a Photo Album
#4 - User see a list of photos in the album
#5 - User views the clicked photo BUT has will_paginate showing in
the nav for all
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
2010 Feb 09
4
Rails3 pre and protect_from_forgery
I''ve almost entirely converted a rails 2.3.5 app to 3pre. I''m having
some trouble with protect_from_forgery. I had protect_from_forgery set
in application_controller.rb, but run some uploadify ajax stuff in one
of my controllers, where I had protect_from_forgery, :except
=> :add_file set.
In rails 3 I''m getting ActionController::InvalidAuthenticityToken on
the ajax
2011 Aug 19
1
How to post a file via HTTP as multipart/form-data to Facebook?
I would like to post a new photo to a user using `Net::HTTP::multipart`
from a Heroku application to Facebook.
I have the following JSON object:
{"message"=>"My message",
"image"=>#<ActionDispatch::Http::UploadedFile:0x00000004242490
@original_filename="neEZYMAnBI.jpg",
@content_type="application/octet-stream",
2008 Dec 08
1
How to upload file by ajax
Hey''
How to upload file with ajax in ROR?
My code not working :(
View file :
<% form_remote_tag(:url => { :controller => ''Upload'', :action =>
''uploadFile''},
:update => "result",
:position => :bottom
:html => {:multipart => true} ) do %>
<p><label
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
2006 Feb 06
2
File_field and Firefox
Hi!
Im developing a simple prototype of an application. It fills an oracle
db with data about a file in the filesystem, and save the entire file
in a blob along with some metadata. To get the file in the db i use a
file_field form helper. All goes well with the radrails-integrated
browser, but it doesnt work anymore in firefox. The problem is,
firefox seems to cut the pathname from the file.
Here
2006 Jun 01
3
Image corrupted on upload
Hi, I''m using the below method to copy/upload a file. The outcome is an
image with the proper dimensions but looks garbled and pixelated. I''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
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>
2010 Sep 09
1
406 Not Acceptable with swfupload
---------flash_session_cookie_middleware.rb
require ''rack/utils''
class FlashSessionCookieMiddleware
def initialize(app, session_key = ''_session_id'')
@app = app
@session_key = session_key
end
def call(env)
if env[''HTTP_USER_AGENT''] =~ /^(Adobe|Shockwave) Flash/
req = Rack::Request.new(env)
params =