Allowing AI file uploads on website front end
-
Hello. I am using woocommerce product addons to allow users to upload a file with their product. I want them be able to upload AI files. Initially wordpress would not allow AI files via the media library. I then fixed this buy adding:
define('ALLOW_UNFILTERED_UPLOADS', true);
To the wp-config file. This allowed AI file in the media library via admin users but not to those using the front end form. I also tried adding this to my funcitons file:
function my_custom_mime_types( $mimes ) { // New allowed mime types. $mimes['ai'] = 'application/postscript'; $mimes['eps'] = 'application/postscript'; // Optional. Remove a mime type. //unset( $mimes['exe'] ); return $mimes; } add_filter( 'upload_mimes', 'my_custom_mime_types' );
I can upload PDFs and EPS via the front end form but still getting told there is a security issue for AI files. Error message is:
Sorry, this file type is not permitted for security reasons.
Anything else I can try?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Allowing AI file uploads on website front end’ is closed to new replies.