L
L
Laurens Stroten2018-02-14 18:23:36
WordPress
Laurens Stroten, 2018-02-14 18:23:36

Wordpress txt files how to prevent downloading?

Wordpress txt files how to prevent users from uploading on a site

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dimonchik, 2018-02-14
@dimonchik2013

https://wordpress.org/plugins/pods/

I
Igor Vorotnev, 2018-02-15
@HeadOnFire

Just remove the .txt extension from the allowed file types:

function modify_upload_types( $mimes ) 
{
    unset( $mimes['txt'] );

    return $mimes;
}
add_filter( 'upload_mimes', 'modify_upload_types' );

L
Lorens Stroten, 2018-02-15
@megallodon

thanks, I watched the video on setting up several times, but where can I indicate how to prohibit txt files from uploading
, maybe there is another easier option?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question