• Resolved ullamook

    (@ullamook)


    Hi there,
    I am trying to upload to my WOocommerce product a digital product that is an exe file. It is located on Onedrive. On Onedrive the file is described as an ‘Application’. It is about 13,000 KB.
    When I try to choose the file by going to the relvant folder on Onedrive, the actual file is not displyed so I cannot choose it.
    I have previously been able to complete this process but for some reason I cannot do it now.
    Would anyone have an idea about what may be the source of this problem?

    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Niels Lange

    (@nielslange)

    Hello @ullamook,

    By default, *.exe files cannot be uploaded in WordPress and WooCommerce due to security reasons. To be able to upload *.exe files, you need to add the following code snippet to your site:

    // Allow uploading *.exe files.
    function enable_extended_upload ( $mime_types ) {
       $mime_types['exe']  = 'application/exe'; 
       return $mime_types;
    } 
    add_filter('upload_mimes', 'enable_extended_upload');

    To add this code to your site, you could use the Code Snippets plugin.

    Alternatively to adding the code snippet to your site, you could also install the WP Add Mime Types plugin to your site, which deactivate all upload restrictions at once.

    ?? In both cases, please deactivate the code snippet or the plugin, once you have uploaded the *.exe file, so that your site remains secure.

    Thread Starter ullamook

    (@ullamook)

    Thanks very much.
    Is this a recent deelopment? I only ask as I was able to upload earlier this year.
    Regards

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @ullamook,

    *.exe files have been blocked from being uploaded to WordPress by default for a long time.

    Perhaps you already had the exemption in place on whatever site you were able to upload to previously.

    I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot upload application from Onedrive to Woocommerce Product’ is closed to new replies.