Store
Community Documentation

v3 Knowledgebase

Adding More Extensions to Attachments


phpFox provides an Attachment module. This module allows your users to attach items such as photos and documents to blogs and/or threads. By default we allow the following extensions:


jpg, jpeg, gif, png & zip

However, there are no restrictions on what can be uploaded. It is up to site Admins to control what they want uploaded on their community. You can add more extensions direct from your AdminCP:


Modules >> Attachment >> Add New Type

In this example we will be adding support for PDF files. For the field:


Extension

we input:


pdf

Next, for the field:


MIME Type

we need to find out what the MIME type is for a PDF file. A list of common MIME types can be found here:


[link='http://www.w3schools.com/media/media_mimeref.asp']http://www.w3schools.com/media/media_mimeref.asp[/link]

In this case the MIME type we will be adding is:


application/pdf

For:


Is Image

we set it to:


No

because this extension will not be treated as an image.
For:


Is Active

we set it to:


Yes

Save the form and you have then successfully added a new extension for attachments.