[Support request] Uploading apk file

Home Forums Support [Support request] Uploading apk file

Home Forums Support Uploading apk file

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #857586
    Jan

    Hello everyone,

    I am trying to upload an apk file to my web, but I can’t make this code work:

    add_filter('upload_mimes', 'allow_custom_mimes');
    
    function allow_custom_mimes ( $existing_mimes=array() ) {
    // ' with mime type '<code>application/vnd.android.package-archive</code>'
    $existing_mimes['apk'] = '<code>application/vnd.android.package-archive</code>';
    return $existing_mimes;
    }

    I tried adding it through Code Snippet, but I am still getting security warning.
    I am using basic Theme (not child).

    Please help:-)

    I am using GeneratePress 2.2.1 and GP Premium 1.7.7

    Thank you,

    Jan

    #858495
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I’ve never done this, so I’m not 100% sure.

    According to my searches, your code is the code to use.

    You could try without the <code> and </code> parts.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.