Displaying 20 results from an estimated 30000 matches similar to: "saving mime type and size of uploads - newbie question"
2006 May 18
0
file_column - filtering uploaded file type and storing image size?
Sorry, more newby FC questions!
I would like to use one file upload field to upload both PDFs and images.
The images are in the listing_images table and PDFs are in the
listing_pdfs table - both have a one-to-many relationship with listings.
How do I do this?
For listing_images, I would like to store the width and height of the
image so I can produce valid xhtml image tags. I can''t
2007 Jan 03
1
file_column plugin and mime types
I am running into an error using file_column plugin, and am not sure
where the problem lies. I am trying to upload Microsoft Excel files and
Adobe Illustrator files, but they are incorrectly identified as
Microsoft Word and Adobe Acrobat files, respectively.
I am not sure if this is a problem with the file_column plugin or
rmagick. Any ideas?
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.
2005 Aug 17
7
(newbie) #{method}_relative_path empty (file upload 0.1.2)
first off, thanks (a lot!) sebastian for creating this module... I''ve
been spending a lot of time in getting file uploads to work.
inside a project I''m working on, I''ve got two different models using
it... with one of them it''s working just fine. with another,
everything works, with the exception of the url_for_file_column
helper, which shows
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 Apr 13
0
Model with file uploads
I''m working on a model for a videos table that include the video info
(title, description) and a couple of uploads (video file, thumb image)
I was going to use the file_column plugin but I dont like the idea of
storing the file names in the database when I dont need to, plus I dont
think it is very flexible.
Here''s what I done. What do you think of this? Any suggestions?
2006 Mar 02
2
How to get mime extension with file_column
Is there a way to get the MIME extension of a file_column field?
Here''s what I want to do (look for comment in before_save method):
class ProductFile < ActiveRecord::Base
belongs_to :product
file_column :file_name
def before_save
self.file_type = # something that returns the MIME type (e.g. image/jpeg)
end
end
TIA
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 Aug 29
15
Setup with Apache 2.2 proxy balancer : timeout during uploads
Hi all,
I encounter timeout errors during file uploads in my Rails application.
I think the problem may be in the Mongrel configuration. Here is my setup:
* Load balancer (Cisco CSM, my provider''s Catalyst 6509)
* Apache 2.2.3 with mod_proxy_balancer
* Mongrel 0.3.13.3
* Rails 1.1.6
* Ruby 1.8.4
* MySQL 5.0.22
* file_column
I host an application in which users may upload medium files
2006 Apr 25
7
[TIPS] File_column plugin and multiple file uploads
No..i am not a full time rails developer...i code in pl/sql for paying my
bills...and i am just working on a pet project...so i had some trouble in
doing..what i specify in the subject.....now somehow i solved this
problem...so those interested can look at the code at:
http://hemant.wordpress.com/2006/04/25/file_column-and-how-the-fuck-it-handles-multiple-files/
I write this mail and
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
2006 Jan 23
3
Clearing a file_column-type field
So I am now able to set/upload an image to my app using file_column,
with a little bit of a change to the code.
I can change the image using an Edit page, but I''m trying to figure out
what to do if the user wants to remove the image. I tried adding a
Remove Image link in my list, but I''m not sure what to do in the
remove_image method in my controller. I tried setting the
2010 Apr 08
1
vsftpd saving uploads twice
I have configured my vsftpd instances to use virtual users and map them
to a system user. So all uploads should be written with owner and group
of this system user (let's call it ftpsystemuser).
But in the the last weeks/months it appears that uploads are written
twice, on instance as it should (owner and group of the system user used
to map the virtual user that did the upload), and the
2006 Jan 09
5
form with more than 1 file upload field saves 0 byte file for 1 file field
Im using the file_column plugin to upload files from my application. The
problem I am encountering is that I have a form with 2 file upload fields
and when I submnit that form with files selected, I would get a message from
the browser(Firefox) saying that a script on the page is taking a long time
to execute and whether I want to cancel it or continue. Whichever option I
choose, only 1 file(PDF)
2006 Jul 13
0
file_column
Hello all, another rails newbie here.
I''m working on an project to simply upload pictures with some extra
information, I was able to get uploads working thanks to file_column,
however, a couple things are troubling me. First of all, according to
the file_column website, displaying images should go like this:
<%= image_tag url_for_file_column("entry", "image")
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 Mar 28
5
Is it possible to upload file with form_remote_tag?
I have tried to upload a picture file with file_column plugin and
form_remote_tag, but no success.
When I do request.params.inspect it shows null for picture parameters.
With normal form the file uploads nicely, so is it possible to upload
file with form_remote_tag?
--
Posted via http://www.ruby-forum.com/.
2006 Feb 20
3
file_column and login_engine incompatibilities
Hi, has anyone come across any incompatibilities between file_column and
login_engine?
I''ve been having strange issues where a User model with file_column in
it is failing to save the images properly. Everything uploads to the tmp
dir fine, but then it never gets copied to the proper permanent location.
No errors - everything happens fine except for that final part.
I have
2006 Aug 24
3
handling file uploads
hey guys,
the way i''m handling file uploads is no good, but i''m not sure what
the best way to go about it is. right now my approach is to use
FileUtils.mv to move the uploaded file to the directory i want it in.
this approach doesn''t work well because sometimes the uploaded file is
just an IO object instead of a temporary file (apparently small files
aren''t
2004 Aug 06
0
newbie q: mime type?
On Wed, 10 Oct 2001, Jon Drukman wrote:
> ok this has to be FAQ #1 but it's not in my FAQ file...
>
> how do i get it so going to my server (http://pretension.com:8000/) starts
> an mp3 player streaming instead of opening up a 51M download window?
You don't. It doesn't work like that. The browser won't launch an app
until the given file is downloaded which, for a