Documentation, Reference Materials and Tutorials for WPForms
Do you want to allow users to upload files on your site? WPForms file upload feature allows you to easily collect files and media through your online forms. In this guide, we’ll answer all of your questions regarding the file upload feature in WPForms.
- How Can a File Upload Form Be Created?
- What File Types are Allowed for Upload?
- How Can File Extensions Be Restricted?
- What is the Maximum File Size Allowed for Uploads?
- How Do Notifications Work With File Uploads?
- Where Are Uploaded Files Stored?
How Can a File Upload Form Be Created?
WPForms makes it easy to accept files from your website visitors. All you need to do is add the File Upload field to your form with just a single click. Or you can even drag and drop the field to your desired location.
For a step-by-step guide, you can check out how to create a file upload form.
What File Types are Allowed for Upload?
Security is a huge priority for us at WPForms, so we restrict file types to safe files only. They are:
- Images like .png, .gif, .jpg
- Documents such as .doc, .xls, .ppt, .pdf
- Audio like .wav, .mp3, .mp4
- Video like .mpg, .mov, .wmv
If you want WPForms to support more file upload types, please take a look at how to allow users to upload more file types.
How Can File Extensions Be Restricted?
To restrict file extensions, click on the File Upload field in the form builder. In the Field Options panel there will a field called Allowed File Extensions. Here, you can specify the extensions you’d like to allow, separated by a comma.
What is the Maximum File Size Allowed for Uploads?
To find the maximum allowed file size, you can click on the File Upload field in the form builder. Then, from the Field Options panel, click the tooltip next to the Max File Size field. This tooltip will show the maximum file size that your server allows.
You can limit the allowed file size by specifying the size in the Max File Size field.
How Do Notifications Work With File Uploads?
When a user submits a form with an uploaded file, you’ll receive email notifications with a link to that file. This means you can quickly view or download the file without having to log into your WordPress dashboard.
Since file attachment can often hurt email deliverability, currently we don’t attach files on emails. For example, if an email provider only allows a maximum of 10MB attachment but the user uploads a file size higher than 10MB, the email won’t be delivered.
Where Are Uploaded Files Stored?
By default, the user-uploaded files are stored in the WPForms folder inside the Uploads directory of your site.
If you’d prefer to upload the files to the WordPress Media Library, click on the File Upload field in the form builder. Then, under Advanced Options, check the box next to Store file in WordPress Media Library.
That’s it! We’ve just covered the most common questions about using the file upload field in WPForms.
If you found this article useful, you might also want to check out how to create conditional form notifications in WordPress.