Forum: Ruby on Rails Content type is not included in the list

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Af10464d988bde1b15b1a324237bad84?d=identicon&s=25 Dharmdip Rathod (dharmdip)
on 2009-06-09 19:18
Hi ,
i am uploading files using attachment_fu ,i  can upload files with
extension .txt, .xls, .doc but when i am going to upload .pdf extension
file i gives

    Validation failed: Content type is not included in the list

error.

My model file code is here .

class Model< ActiveRecord::Base

  has_attachment :content_type =>['application/pdf','application
/msword','application/vnd.ms-excel','text/plain'],
:storage => :file_system,
:size => 0.kilobytes..10000.kilobytes
        validates_as_attachment
end


Is there any issue for attachment_fu or anything else ?
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-06-10 01:06
(Received via mailing list)
On Jun 9, 6:18 pm, Dharmdip Rathod <rails-mailing-l...@andreas-s.net>
wrote:
> Hi ,
> i am uploading files using attachment_fu ,i  can upload files with
> extension .txt, .xls, .doc but when i am going to upload .pdf extension
> file i gives
>
>     Validation failed: Content type is not included in the list

What is the content type that is getting submitted ?

Fred
Af10464d988bde1b15b1a324237bad84?d=identicon&s=25 Dharmdip Rathod (dharmdip)
on 2009-06-10 19:09
:content_type =>['application/pdf']
This topic is locked and can not be replied to.