Displaying 20 results from an estimated 20000 matches similar to: "file upload problem"
2007 Oct 30
1
Merb - Losing connection to MySQL
Hello,
Once or twice a day I''m losing connection to MySQL and this error is
generated:
Mysql::Error: Lost connection to MySQL server during query: INSERT INTO
pictures (`content_type`, `name`, `size`, `thumbnail`, `updated_at`,
`pictureable_type`, `description`, `pictureable_id`, `filename`, `height`,
`user_id`, `parent_id`, `created_at`, `width`) VALUES(''image/jpeg'',
2010 Aug 18
0
paper clip plugin validation fails
hallo friends i developpeda photo uploader using paper clip plugin
its working quite well , but one problem is its able to upload all
kinds of file. see i want only png,gif,jpeg and should show error
message if validation fails.here if i applied validations in the model
the result is errors like this
ArgumentError (too few arguments):
app/controllers/images_controller.rb:63:in
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
2006 Mar 06
1
Uploaded File to Database
Hi,
I currently write a tool for my school. Therefore I have to save
uploaded files.
I bought Agile Web Dev. with Rails to learn webdev with Rails.
I''m very new at rails and couln''d find anything on the internet.
Now when I want to save the file data to the mysql database, rails gives
me an error.
My code is the same as written in the book on page 363.
Here is my code of the
2006 May 29
3
File.size() on Uploaded Images Fail
I am checking the file size of an uploaded file and storing it in a filesize
column. It will work just fine when the user uploads any files other than
images (jpg,png,gif).
Word, Excel, Powerpoint, .zip and more all work fine.
This is my model asset.rb that handles the file upload.
def newfile=(newfile_field)
self.filename = base_part_of(newfile_field.original_filename)
self.filetype
2009 Feb 22
2
Mysql error unknown column 'columns.user_id'
Had this error when trying to add comments to another user''s photo.
ActiveRecord::StatementInvalid in User photosController#show
Mysql::Error: Unknown column ''comments.user_id'' in ''on clause'': SELECT
photos.`id` AS t0_r0, photos.`user_id` AS t0_r1, photos.`title` AS
t0_r2, photos.`body` AS t0_r3, photos.`created_at` AS t0....
I did create a user_id
2007 Apr 17
0
rflickr: invalid auth token when uploading
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, I''m working on an application which uses rflickr to upload images to
flickr. I''ve generated and cached an auth token as described in the
GETTING STARTED document in the rflickr tree. However, when I call the
API, I receive an error stating "ERR: Invalid auth token (98)". The
extended error is:
XMLRPC::FaultException
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
2005 Dec 16
0
upload problem with mimetypes
I am building a flash-based uploader for rails that allows multiple
files to be selected from a user''s hard drive and then put into a
queue for upload. This works great except that macromedia uploads
everything as "application/octet-stream". This means that displaying
the newly uploaded content inline is a pain because the browser asks
to download it first.
To get around this I
2006 Jan 09
1
Saving an upload
I am creating a database for movies (films) and television shows (shows)
that will have has_and_belongs_to_many relationships with the pictures
table.
CREATE TABLE screenshots (
id serial NOT NULL,
filename character varying NOT NULL,
content_type character varying NOT NULL,
primary key (id)
);
CREATE TABLE films (
id serial NOT NULL,
name character varying NOT NULL,
2006 Mar 25
0
Self-Referential Many-To-Many relationships where the relationship itself has data.
Trying to model a bunch of users that have friends that are other
users. clearly a job for has_and_belongs_to_many, but the trick is,
they have ratings for their friends. I have gone through the Rails
Recipes book, and it seems like I''m trying to combine the
self-referential many-to-many recipe (12) and the many to many
relationships where the relationship itself has data recipe (16). So
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
I have a simple form , with a file field
= form_for (Clip.new), :html => {:multipart => true} , :remote =>
true , do |f|
= f.hidden_field :user_id, {:value => current_user.id}
= f.text_field :name
= f.text_area :description
= f.file_field :image
= f.submit I18n.t(:add)
generating the html code
<form accept-charset="UTF-8"
2005 Dec 23
2
has_many and belongs_to relationship error
Hi i am getting following error
ActiveRecord::StatementInvalid in Blog#index
Showing app/views/blog/index.rhtml where line #10 raised:
Mysql::Error: #42S22Unknown column ''posts.user_id'' in ''where clause'':
SELECT * FROM posts WHERE (posts.user_id = 4)
Extracted source (around line #10):
7: <div class="separator"> </div>
8:
2007 Sep 26
0
[Story] passing a file using post
I''m trying to run a story for sample caboose that I created.
I haven''t changed any of the sample application code.
When I try to do the following:
When "creating a new asset named",
File.open(''/Users/multimedia/desktop/sample/assets/bridge.jpg'')
do |path|
post_via_redirect "/users/#{@user.login}/assets", :asset => {
:uploaded_data
2006 May 11
0
File upload works with webrick, but fails in lighttpd 1.4.11
I''ve been trying to add a basic file upload feature (just based on the
Rails Recipes example), but I find that it only works with the webrick
server and not my lighttpd 1.4.11 server.
I''m running Rails 1.1.2 on OSX. The upload silently fails with both
firefox and Safari, even with the useragent hack and with any size of
file/image. My lighttpd config is pretty standard as
2011 Jan 15
3
has_many :through with Single Table inheritance
I have the following model structure setup.
class User < ActiveRecord::Base
end
class Parent < User
has_many :relationships
has_many :children,
:class_name => "Student",
:through => :relationships,
:conditions => "related_as = ''parent''"
end
class Student < User
has_many :relationships
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
any suggestions on why I am gaining this error.
ActiveRecord::StatementInvalid in ProjectsController#create
Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near '' , , , , )'' at line 1: INSERT INTO projects (`name`,
`date_created`, `quote_id`, `client_id`, `description`, `user_id`)
2006 Feb 05
0
validating presence of file uploads
not sure whats going on here, but I''m using some pretty standard code to
manage file uploads in to a db, but having trouble detecting if the file
upload field has been filled or not.
in my Asset Model, I have:
def asset=(asset_field)
self.name = base_part_of(asset_field.original_filename)
self.content_type = asset_field.content_type.chomp
self.data = asset_field.read
end
def
2006 Jul 11
1
Problems using the authorization plugin from Bill Katz
Hello everyone,
I was trying to set up access control in a new application Im working on,
I''m trying to use the excellent authorization plugin from Bill Katz,
Its pretty straight forward to setup and should be to use.
But when i try to give the same permission on two differents users on
the same object i get an error.
(Well , Im kinda new to all this rails stuff)
r = Red.find(1)
u1 =
2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
Basically, I''m trying to crop multiple images out of a remote/original
scene.. Think flickr ''tagging'', only, the pixs in the tagged boxes
become their own unique images.. by way of simulating an upload from
the controller using attachment fu.. can''t quite figure out the
specific method in fu that would allow me to do this.. I''m so near the
edge right