Solved

Wordpress htaccess upload only pictures

Posted on 2014-09-29
2
249 Views
Last Modified: 2014-09-29
Hi

I have a blog with more then 3000 users.
They are aloud to publish, but I only want them to upload pictures (png/jpg) and no pdf or other documents.
How can I do this via .htaccess?

Thanks,
HP
0
Comment
Question by:HPvH
2 Comments
 
LVL 62

Assisted Solution

by:gheist
gheist earned 200 total points
ID: 40349537
htaccess is not in position to distinguish upload content.
you need to add a filter to uploads (or tweak upload function in PHP)
0
 
LVL 32

Accepted Solution

by:
DrDamnit earned 300 total points
ID: 40349813
You need a plugin that users the upload prefilter method to distinguish and discriminate files based on file extension or MIME type.

Try:

https://wordpress.org/plugins/enhanced-media-library/
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Contact Form 7 3 25
What is wrong with this PDO Delete Query? 2 17
PHP Soap Server returning XML but < & > as &lt; / &gt; 9 42
Wordpress Security 29 46
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question