Site logo

Archived topic

Uploading apk file

1 reply · Started by Jan on April 2, 2019

Viewing posts 1–2 of 2

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

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.

This archived topic is closed to new replies.