"Invalid file type" warning on File Upload field
The WooCommerce Product Options plugin lets you add file upload fields so that customers can add files to the products they are ordering. If customers are seeing an "Invalid file type" warning when they try to upload files, then there are two possible causes:
- The file type has not been enabled on the file upload field.
- The file type is not permitted on your WordPress installation.
Keep reading to learn how to check which of these is causing the problem.
Checking that the file type has been enabled on the file upload field
When you create a file upload field, the 'Advanced' section allows you to enter the file types that the customer can upload:
You can check the settings for your file upload field as follows:
- Go to Products → Options.
- Open the option group.
- Edit the file type option.
- Open the 'Advanced' section and check the 'Allowed file types' field. Add any additional file types as needed.
Checking that file type is permitted on your WordPress installation
WordPress itself has settings which control which file types can be uploaded. If the customer's file type has been enabled on the file upload field but there is still an error, then this probably means that your wider WordPress installation has forbidden that file type.
There are several ways to check this and change the allowed file types:
- If you're using WordPress multisite then there's an 'Upload file types' setting in the Network Admin under Settings → Network Settings.
- You can ask your host to check it for you.
- IsItWP has published a useful article about different ways to change the allowed file types, including suggested plugins that can do it for you.
Related Articles
- The live preview image doesn't appear or gives a "Mixed content" error
- Why is the live preview loading slowly?
- The live preview isn't showing on the cart or checkout
- Why do my image buttons have a double border?
- The page crashes when I save a product option
- Error: "There was an issue while creating the group. Please try again."