Displaying 20 results from an estimated 2000 matches similar to: "filecolumn to database"
2006 May 19
1
FileColumn
I''m using Windows and Postgres 8.
I installed RMagic gem thingy and FileColumn plugin ok.
I followed instructions exactly as directed on FileColumn web site which
is very straight forward:
---model
class My_model < ActiveRecord::Base
file_column :column_for_file_name
end
-----view -upload form--set to mulitpart
<%= file_column_field "my_model",
2006 Mar 20
1
FileColumn question
Can someone please help me with this.
I have an Images table :-
create table images (
id integer unsigned not null auto_increment primary key,
image varchar(200) not null default ''''
)ENGINE=InnoDB default CHARSET=latin1;
And a car table :-
create table cars (
id integer unsigned not null auto_increment primary key,
user_id integer unsigned not null,
title varchar(100) not
2006 Jun 10
0
Dynamic file paths in FileColumn
I have a file uploader application in ROR using the very nice FileColumn
plugin. In looking at the source code I can see that there is a
DEFAULT_OPTION hash with some root path options and such which can be
merged from an options paramater. These static path changes are not a
problem.
My question is dynamic path options. My upload form, when you boil it
down, has two fields. The first is
2005 Dec 29
3
FileColumn Help
i''ve changed store_dir to :store_dir => "public/uploads/users/pictures/"
that works great for uploading, but url_for_file_column is still
outputting:
/user_picture/image/id/name.jpg
how do i make url_for_file_column output the correct url?
--
Posted via http://www.ruby-forum.com/.
2006 Jan 22
2
File_column not keeping value during page reloads
I''m trying to use the file_column plug-in to attach a file to a
newsletter posting. It works fine if I get the form right the first
time, but if I get an error, such as not typing in a required field, and
the form re-displays, my file selection box reverts to "no file selected."
Here''s my relevant controller code:
def new
@newsletterpost = Newsletterpost.new
2006 Jan 12
5
file_column preview in multistage forms
i have a 2 step form which contains 1 file_column field.
The second form is just "This is how your post will look" kind of form
and the user can click Edit (to take them back to form1) or Submit.
If the user clicks edit it takes them back to the first form with
fields populated. I have it working with all text fields, I just dont
know how to do this with file_column field (showing the
2005 Dec 31
4
How might I use file_column for incoming email attachments?
I''m writing a ''Mailman'' model that catches emails sent to my
application (kind of like backpack, I think). The trouble is that
I''d like to save image attachments in the same was that file_column
saves them--in fact, I''d really like to use a simple assignment like
photo.image = attachment to save the image in its proper place.
However,
2006 May 15
5
Finding out the file attributes in FileColumn models
Is there a way to find out the attributes that have been passed to
file_column in models? I''ve looked through the source and it seems that the
file_column methods are generated at runtime but there''s actually no class
or instance variable that hold the file attribute.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jan 09
5
file_column content type
is there a way using the file_column plugin to enforce a certain
content type based on regex (i.ie, /^image/) and/or filesize (150k)
?
thanks
adam
2006 Mar 23
5
Filecolumn storage location
Hi,
I am using file_column for some image uploading. I want to have all
the images stored under one root which I have managed by setting the
:store_dir option as below.
file_column :filename, :store_dir => File.join(RAILS_ROOT, ''public'',
''images'', ''products'')
So, my images get uploaded to:
/public/images/products/<primary_key>
2006 Apr 01
4
Saving images in shared directory w/ Capistrano/SVN?
Hi all,
I''m using Capistrano and SVN to version control and deploy, but I''m not
sure what to do about my images directory. I use file_column and
RMagick to save images to the disk under a model called "Image", and
they''re saved in public/image/... etc.
Each time I deploy a new version, my image folder doesn''t exist anymore.
I don''t want
2006 Jul 30
1
FileColumn - Validate Before Saving
file_column is great -- but I need a way to run through the validations
(ie: validates_file_format_of) before saving. That is, when a user first
uploads an image it is displayed in the view but not ''saved'' until they
click the ''Save'' button on the form. I want to display an error
message/disable the ''Save'' button if the file they just
2006 Jan 03
3
file_column howto (beginner)
I''m trying to use file_column as a Rails plugin.
Of course I read the doc (from Sebastian, this maillist) and little
bit of source (as good as I, newbie, could understand it)..
But I''m not able to implement it in my app.. I''m a totally newbie with
less software development experience.
I get the file_column_field in my view with simply invoking the
helper... (:multipart
2006 Jan 22
12
Problems with File_column
Hi,
Rails - newbie here..
I''m setting up an app and am trying to use file_column to upload a
picture with an item and I''m running into several problems.
(Background: I''m running Locomotive Rails under OS X 10.4.4, and using
Safari)
I followed the directions to add the necessary items, then found out
that I had to add the item to make the form tag be a multipart
2006 Apr 14
5
state_models plugin and file_column?
I was looking at Kyle Mawell''s extremely nifty-looking StateModels
plugin
http://www.kylemaxwell.com/articles/2006/02/06/fun-with-single-table-inheritance
and before I go down the road with it, I was wondering if anyone has
used it with file_column.
The way file_column deals with an uploaded file -- by storing it to the
filesystem in a path that employs the model name and id --
2006 May 02
3
file_column : _temp field always nil
Hi,
I''m trying to set up file_column to upload attachments for emails. My
view has <td align="left"><%= file_column_field ''to_do'', ''attachment''
%></td> and the attachment_temp hidden field is generated. When I
inspect tthe params on saving the form the attachment_temp param is
always an empty string. Also, when I was
2006 May 28
4
File_column trouble, advice needed
Finally i have RMagick and the file_column plugin installed, but at the
time of uploading images i have trouble, i get "uninitialized constant
ArtImage" error and other errors, im following the instructions on
http://wiki.rubyonrails.com/rails/pages/HowToUseFileColumn but doesnt
seems to work, this its the code im using:
#----view
<%=
2005 Nov 18
10
[Request] file_column configurability
I wasn''t sure where to email this request, so I am hoping the author of
file_column actually sees this. I was wondering if there were any plans to
allow some configurability in the file_column plugin. By configurability I
mean allowing the developer to define which table column is used as the
unique identifier when creating image folders. Right now it seems like it
uses the ID of the
2006 Apr 28
2
file_column with polymorphic table relationship?
Hello,
I''m just starting out with both Rails and Ruby, so I hope this isn''t too
simple of a question - but I''ve been struggling to find a solution.
I''m using the file_column plugin to handle image uploads and thumbnail
generation. In addition, I''ve wrapped the image into a polymorphic table
so I can have uploaded images associated with multiple
2005 Dec 04
2
Filecolumn: url_for_file_column problem
Calling url_for_file_colum results in a TypeError: can''t convert nil to string.
The error is in line 148 of filecolumn.rb:
def relative_path(subdir=nil)
File.join(relative_path_prefix,subdir, @filename)
end
If I substitute '''' for subdir in the File.join command, then it seems to work fine. Since this is a plugin, I''m wondering why I need