Web Development & WordPress

How to Allow File Upload in Contact Form 7 (Set File Types & 100MB Limit in WordPress)

If you are using Contact Form 7 in WordPress and want users to upload files securely, you can easily configure allowed file types and maximum upload size using the file tag.

For example, something like this:

Various Types of File Upload in  Contact Form 7 with 100MB size

Here is the code which you need to use in Contact Form 7

<p>File Upload 1
 [file file-167 filetypes:doc|pdf|txt|odt|gif|jpg|jpeg|png|docx|xlsx|xls|ppt|pptx limit:100mb]</p>
<p style="font-size: 13px;line-height: 9px;margin-bottom: 8px;font-style: italic;">Acceptable file types: doc,pdf,txt,gif,jpg,jpeg,png,docx,xlsx,xls,ppt,pptx. Maximum file size: 100mb.</p>

This configuration allows users to upload documents, images, and Microsoft Office files including DOC, PDF, JPG, PNG, DOCX, XLSX, PPTX, and more. The filetypes option restricts uploads to only the specified extensions, improving security and preventing unwanted file formats. The limit:100mb parameter sets the maximum upload size to 100MB.

This is especially useful for job applications, project submissions, support tickets, or client document uploads where larger files may be required.

Leave a comment