Displaying 20 results from an estimated 10000 matches similar to: "file_column - filtering uploaded file type and storing image size?"
2006 May 07
4
Getting column value from lookup table in HABTM relationship
I have a HABTM relationship between my agents and listings tables. Each
listing can have many agents and each agent can have many listings. In
the agents_listings table I have a column called ''is_primary_agent''
which denotes if the agent is responsible for the listing - only one
agent can be primary.
At the moment I use this in my listing_controller''s view
2006 Mar 16
0
problem with file_column storing images and other files
I have a model called ProductFiles which associates an arbitrary
amount of image and documents with a product. I am using the
file_column plugin to manage the upload and storage of the images,
like so:
class ProductFile < ActiveRecord::Base
# Accepted MIME types, mime types that are not part of this list are rejected
MIME_EXTENSIONS = {
"image/gif" => "gif",
2006 Jun 14
0
Copy an already uploaded file using file_column
Hi there,
Is it possible to use file_column to copy an already uploaded file to
another directory? I have a list that displays a whole bunch of uploaded
files with radio buttons next to them. Whatever file is selected (and only
one file can be selected at a time), the file would then be copied into a
different directory.
Thanks,
Dave Hoefler
-------------- next part --------------
An HTML
2006 Jul 27
0
Separating file_column upload directory by account
I''m working on an app right now that uses
http://www.kanthak.net/opensource/file_column/index.html Sebastian Kanthak''s
file_column plugin for file uploads. The usual directory structure it saves
to is:
model/attr/id/filename
For my current project, I''d like to separate uploads by account so that it''s
easier to monitor an account''s resource usage.
2006 Mar 26
10
How to delete a uploaded file with file_column plugin?
Hi,
sounds somehow stupid, but I can''t get rid of my files that I uploaded
into my application via the file_column plugin. Any suggestions?
Cheers
Thomas
--
Posted via http://www.ruby-forum.com/.
2006 Jun 20
0
file_column Trying to Create Thumbnails of Non-Image Files??
Howdy.
We use the handy file_column plug-in in some of our apps.
We have a model with a file field and we upload both images and non-images
into this field.
It is specified as follows:
file_column :file_uri, :magick => {:versions => {:thumbnail => {:size =>
''200x''}}}
Well, it works great for images but for non-images, the save fails. The root
cause is an
2006 Jun 28
6
file_column plugin. Storing files outside RAILS_ROOT
I also posted this on Rails Engines forum. Sorry for the double post.
I am trying to configure file_column plugin so that it stores the images
in a directory completely outside of RAILS_ROOT.
I have no problems in storing the files by setting :root_path option.
But I can''t get to display these images using ''url_for_file_column''.
What I get instead of the image is
2006 Jan 12
2
file_column issue: file upload fails without error
environment:
Locomotive + Rails 1.0 Max
Lighttpd 1.4.8, FastCGI 2.4.0
Ruby 1.8.2
File_column version: 0.3.1
Path to file_column: /vendor/plugins/file-column/
symptom:
Uploading a file using file_column fails; no file is uploaded and the
"filename" column remains blank. No error messages are produced - a new
record is created with blank filename.
code and log here:
2007 Aug 17
1
zipping a file after upload, file_column
I''m using file_column and I''m not sure where to put code for zipping
(compressing) a file.
I want to upload an audio file, but compress it as a .zip file before
saving.
That way I can force downloads rather than having audio files load in
visitor browsers.
question is: Where do put code to do the zipping, so that it occurs
before the file is saved?
I want the database entry to
2006 Feb 27
0
File_Column: Saving image dimentions in database
I''ve been using file_column for a while and it''s the best thing since
sliced bread. But there''s one thing that it doesn''t do that seems like
it''d be a pretty useful feature.
For an app I''m working on I really need to know the dimensions of the
store image in my view (and in general it''s always good to have the
dimensions in your
2006 Jun 01
3
file_column - blank folder created, no upload
i want to upload and resize images so i installed the file_column plugin
but im having a big trouble, i have a table images with (id, name)
fields where the images names/path will be stored, i get a success
message(from the controller after @art_image.save) every time i try to
upload but only a blank directory its created /public/image/name/tmp ,
without errors messages, i see a post related
2006 May 31
6
Restricting access to files uploaded by file_column
Hi Guys,
Does anyone know how to restrict access on files that you upload in file
column to certain users only? I notice that files being saved by the
file_column by default are being saved under the public folder and can
be accessed just by typing the URL directly. Let''s say you have a Login
system where you restrict access to some pages and allow those users to
upload their own
2006 Jan 05
1
File_column image validation
Hello,
Is it possible to enforce minimum image size and other validations using
file_column? if so does anybody have some examples. I have looked at Kyle''s
file_column extension and I saw that it enforces format''s (jpg,pdf etc) but
nothing for size.
Thanks!
Sunder
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Apr 05
0
file_column create image on fly
hello,
i''ve added version "small" => {:size => "320x240>"} to file_column. But
it doesnt create that size image. How to tell file_column to create
small image if it doesn''t exist?
Thank you
--
Posted via http://www.ruby-forum.com/.
2006 Jan 08
0
Creating versions with file_column but only if file is image
I would like to create versions of images uploaded to a model that has a
file_column but only if the file is a image.
file_column :file, :magick => { :versions => {"thumb" => "64x64"}}
If I upload a txt file this will give me an error of "File invalid
image".
Any idears?
--
Posted via http://www.ruby-forum.com/.
2006 Jan 25
0
file_column and image attributes
Hi,
I have included the use of file_column in my app and it works great.
I noticed that by default this plugin doesn''t account for image width
and height attributes. I take it that most developers using this
plugin are simply not recording or outputting this meta data so that
the browser is basing the page rendering on the actual sizes of the
embedded images rather than width
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 Mar 08
3
file_column Cropping -> image offset information
Hello,
I had a problem cropping images with file_column. These are my settings:
file_column :image, :magick => {
:versions => {
:thumb => "80x80>",
:medium => "150x150>",
:square => {
:crop => "1:1",
:size => "50x50!"
}
},
2006 Feb 16
4
file_column :: changing image with object.update
Dear all,
file_column now works fine with object.save i.e., it updates my
database field with the correct image file name and places the image
file into the correct public folder.
However, I cannot get file_column to work the same way with
object.update when trying to change image. It only updates my field
with the image file name. However, the new image is not copied into
the correct
2006 Jun 05
1
file_column permissions
this is getting frustrating...
i installed file_column without a hitch for the first time to just play
around with. using the exact same steps as before, i try to use it with
one of my actual applications, and i get "permission denied" errors. i
figure there might be some conflict with my application so just for
kicks i do the exact same thing i did the first time to test