Solved

Wordpress htaccess upload only pictures

Posted on 2014-09-29
2
231 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
Comment Utility
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
Comment Utility
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

763 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

6 Experts available now in Live!

Get 1:1 Help Now