?
Solved

Wordpress htaccess upload only pictures

Posted on 2014-09-29
2
Medium Priority
?
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 62

Assisted Solution

by:gheist
gheist earned 800 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 1200 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
Suggested Courses

765 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