# Content type is not included in the list

**URL:** <https://www.ruby-forum.com/t/content-type-is-not-included-in-the-list/169866>\
**Category:** Rails\
**Created:** [June 9, 2009, 7:18pm UTC](https://www.ruby-forum.com/t/content-type-is-not-included-in-the-list/169866 "2009-06-09T19:18:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dharmdip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Post date:** [June 9, 2009, 7:18pm UTC](https://www.ruby-forum.com/t/content-type-is-not-included-in-the-list/169866/1 "2009-06-09T19:18:19Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![dharmdip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Post date:** [June 10, 2009, 1:06am UTC](https://www.ruby-forum.com/t/content-type-is-not-included-in-the-list/169866/2 "2009-06-10T01:06:37Z")

</div>

On Jun 9, 6:18 pm, Dharmdip R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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

---

<div class="post-metadata">

**Author:** ![dharmdip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Post date:** [June 10, 2009, 7:09pm UTC](https://www.ruby-forum.com/t/content-type-is-not-included-in-the-list/169866/3 "2009-06-10T19:09:03Z")

</div>

:content\_type =\>[‘application/pdf’]
