similar to: file_column content-type, filesize, etc.?

Displaying 20 results from an estimated 20000 matches similar to: "file_column content-type, filesize, etc.?"

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 Feb 24
0
Re: file_column on windows?
I am not able to get this to work on Windows, and the problem has been documented with a fix here, but I can''t get the fix to work, either. Ok, I admit it: I am a newbie with rails! here is the problem''s fix: You can fix your file_column for now by replacing the get_content_type method in lib/file_column.rb with this version: def get_content_type(fallback=nil)
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 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
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 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
2006 Apr 28
0
image content-type question
If I want to check that someone has uploaded a standard image, would simply doing class Image def validate errors.add(:content_type, "must be an image") unless content_type and content_type.include?("image") end end So, basically checking to make sure that the content type of the image contains "image". Will that backfire at any point? I suppose I could
2006 Mar 04
13
file_column
Restricting size of an uploaded file, is how is that possible? If I do not want a user to upload a file larger than X bytes, can it easily be done? If I also would like restrict the types of files that can be uploaded, how may I do so? Thank you, Sharkie
2007 Mar 19
1
HOWTO: Multiple file upload with file_column
Lots of requests but not many answers on this topic. Here is how you do it: FORM: <table> <% for i in 1..6 %> <tr> <td class=''Label''><label>Title</label></td> <td><input id="<%= "picture_#{i}_title" %>" name="<%= "picture[#{i}][title]" %>" size="30"
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
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 Apr 13
2
Content-type on render :file
Hi all, I''ve just been trying out the dirt-simple rcss scheme posted here: http://blog.hasmanythrough.com/articles/2006/03/23/dirt-simple-rcss-templates It looks like the content-type declaration on the line: render :file => file_name, :content_type => ''text/css'' isn''t getting honoured. I had to add a separate:
2006 Feb 09
0
filesize problem...
dear list, following problem with large files: server: samba 3.0.21b debian linux kernel 2.4.32 filesystem ext3 client: windows xp sp2 - i layed a tarball to the directory with a size of 35GB (also tested with a smaller filesize of 7.2 GB) - the filesystem shows the correct filesize. - looking via samba share, there's a filesize of 2.91GB??? - trying to copy a file bigger then 2.91 GB i
2004 Aug 04
2
refresh filesize of samba shares with win2k
hi, in this days i'm trying samba because i would like to substitute an NT file server. i found this problem: when with a client win2k i'm connected to samba server i can't see the latest situation about my shared directory on the samba server. example : if i create a new file named foo.txt , then i can see it with filesize = 0 byte then i edit foo.txt and add some char into the
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
2006 May 07
1
file_column problem - uninitialized constant Magick
Hi, I''m on Windows and getting the following error while trying to use file_column with RMagick, uninitialized constant Magick C:/INSTAN~1.0/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' #{RAILS_ROOT}/vendor/plugins/file_column/branches/kyle/lib/file_column.rb:621:in `file_column'' I installed file_column by
2006 Jul 20
1
file_column - assigning with an actual file rather than a multipart
Hi there, I''m using the wonderful file_column and have struck an issue that someone might have seen before. My images already sit on the server. So, instead of passing a multipart message I''m sending a file object. Something like... f = File.new("public/gallery_images/builder.png") p = Product.find_first p.image = f p.save On the save I recieve an error which
2005 Sep 09
5
file_column: patched for imagemagick and validation
Hi all, I patched file_column to add imagemagick transformations of uploaded content. I added an options hash, and it takes the :magick and :format keys. :magick is a string of imagemagick command line options for convert (Reference: http://www.imagemagick.org/script/convert.php). Format is an optional extension for the finished image. If Imagemagick recognizes the extension, then it will
2006 Nov 04
0
weird problem with content type
Hey all, My site is working ok except for a page that displays as text instead of html. I tried to use this: puts "Content-Type: text/html" then it display the page as html normally but I still get that ugly part on top of my page: Content-Type: text/html Set-Cookie: _session_id=6356b18a24d56a0da01bfab791fa911d; path=/ Status: 200 OK Cache-Control: no-cache here is the url:
2006 Feb 13
3
file_column: uninitialized constant Magick
I am getting this following error when using file_column with RMagick: uninitialized constant Magick /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/dependencies.rb:200:in `const_missing'' ./script/../config/../vendor/plugins/rails_file_column/plugins/ file_column/branches/kyle/lib/file_column.rb:621:in `file_column''