Solved

Wordpress htaccess upload only pictures

Posted on 2014-09-29
2
238 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 61

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

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). #…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now