HomePage › Forums › Plugins Support › Drop Uploader – CF7 Version › Additional File Extensions not Working
- This topic has 3 replies, 2 voices, and was last updated 5 years, 10 months ago by
borisolhor.
-
AuthorPosts
-
June 20, 2020 at 9:46 pm #1172
First of all, thanks for the plugin, uploading +500MB is now possible even with WP Engine’s restrictions of 256MB, now to the problem:
We need to receive files in these file extensions:
STL, 7z, pdf, ai, CATPart, DXF, easm, eprt, iges, igs, ipt, numbers, pages, prt, sldasm, slddrw, sldprt, step, stp, tif, x_t, zipWe can upload files using the extensions mentioned above via Media Library in WordPress.
Things we’ve done so far:
1. Added define(‘ALLOW_UNFILTERED_UPLOADS’, true); to wp-config.php
2. Installed the *WP Extra File Types* Plugin https://wordpress.org/plugins/wp-extra-file-types/
3. Added a custom code to functions.php
// ARRK Upload Extensions Start function my_myme_types($mime_types){ $mime_types['7z'] = 'application/x-7z-compressed'; $mime_types['easm'] = 'application/octet-stream'; $mime_types['eprt'] = 'application/octet-stream'; $mime_types['numbers'] = 'application/vnd.apple.numbers'; $mime_types['pages'] = 'application/vnd.apple.pages'; $mime_types['tif'] = 'image/tiff'; $mime_types['x_t'] = 'model/vnd.parasolid.transmit.text'; return $mime_types; } add_filter('upload_mimes', 'my_myme_types', 1, 1); // Finish ARRK Upload Extensions4. Edited cfdu_interfase.php on the $file_ext_mime = array( to add aditional extensions
'7z' => 'application/x-7z-compressed,7z', 'easm' => 'application/octet-stream,easm', 'eprt' => 'application/octet-stream,eprt', 'numbers' => 'application/vnd.apple.numbers,numbers', 'pages' => 'application/vnd.apple.pages,pages', 'tif' => 'image/tiff,tif', 'x_t' => 'model/vnd.parasolid.transmit.text,x_t',All of this and still no luck with additional extensions, so I now return to you 😉
I also sent you an email for an adittional personalized solution.
June 22, 2020 at 9:50 am #1176Hi!
Seems like everything is fine.
Can you give me your Drop Uploader shortcode from Contact Form 7.
Also please check your files mime-types (sometimes it can be different from expected).
Also please tell me, what types of files you can’t upload, and what error do you have.June 22, 2020 at 11:49 pm #1179This reply has been marked as private.June 23, 2020 at 8:46 am #1181Hi!
I checked your demo files with different extensions, and seems they all have mime type of zip file. My plugin is check mime type of file, so you need to use correct file type to upload it.
Also seems like you not added all of file types, that you use in shortcode to$file_ext_mimearray. -
AuthorPosts
You must be logged in to reply to this topic.