2

When i create an article i saw that i'm allowed to upload image files only

Allowed file types: .png .gif .jpg .jpeg

How can i add .pdf file extension and attached with the article?

I'm using zen theme

1
  • Try to create one field type "file"and then search the field "Allowed file extensions" and adding .pdf . Jul 7, 2011 at 20:15

5 Answers 5

2

Go to Structure > Content types, click manage fields for the article content type, then edit on the Image field. There you can edit the allowed file types.

However, note that this is an image field. It does not make sense to upload PDF files to an image type field. Instead, you might want to add a new field with type file and configure that to allow pdf files.

Also note that you can't leave the allowed values empty, that would not allow any file types.

1
  • it has nothing in managed field.Do I have to create new field? How do I add vtt type in simple file upload ... I am using form to upload it works for txt but not working for vtt and exel
    – Hitesh
    Mar 27, 2014 at 6:58
1

Go to "Administer -> Site Configuration -> File Uploads," add '.pdf' to the "Default permitted file extensions:" section, and click on "Save configuration."

1
  • The queston is tagged 7. The setting you suggest is used doesn't exist in Drupal 7. May 24, 2014 at 4:52
1

There is a module for Drupal 6: File attachment utilities; you can get some idea from its code.

0

You can setting by content types -> article -> edit and then you must adding to upload field the extension .pdf

It' s easy!

0

Navigate to Administration » Structure » Content types. Click on Manage fields for the "Article" content type. Note that in Drupal 7, the default "Article" content type already have a field for file attachments (named "Attachment"), so there is no need to create a new field, as suggested in the currently accepted answer.

Press the Edit link on the Attachment field and locate the field Allowed file extensions

The default attachment content type is just txt. Change this to txt pdf, and press "Save settings".

To add a PDF attachement, make sure you use the Attachment field (not Image field) for the PDF-attachment when creating new Article content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.