Solved

Wordpress htaccess upload only pictures

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

832 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