Restricting File Uploads by Type

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
baldguy
Forum Members
Forum Members
Posts: 34
Joined: Mon Jan 28, 2008 4:04 am

Restricting File Uploads by Type

Post by baldguy »

Using CMSMS 1.9.2

Is there any way to restrict the types of files that can be uploaded in the Image Manager (and by extension, the File Manager)?

It seems that only image files will display in the Image Manager, but you can upload any file type in both the Image and FIle Manager, including .exe files.

The only control I can see is in Group Permissions, where I can assign Modify FIles to "yes" or "no". I would like to be able to allow a user to upload a file when they are adding/modifying a page, but restrict it to a .jpg, .png, .pdf, or .doc. Am I missing a setting somewhere that specifies this?

Thanks!
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Restricting File Uploads by Type

Post by jmcgin51 »

I don't believe you can restrict by filetype for the core File Manager or Image Manager. If you use the Uploads module, you can restrict the file types that a user can upload. IIRC, you can create a "master" list of allowed file types in the admin, and then you can further restrict front-end uploads by specifying the allowed types in the front-end upload form itself.
baldguy
Forum Members
Forum Members
Posts: 34
Joined: Mon Jan 28, 2008 4:04 am

Re: Restricting File Uploads by Type

Post by baldguy »

Thanks for the heads-up on that module. It looks like it might do the trick, although it would be nice to have the option to disable the Time Limited Access (not necessary for what I want to do).

What I'm trying to do is to set up a demo site that my clients and prospective clients can use to try out the system (with the configuration and modules that I've preset). I'd like them to be able to upload an image to see how easy it is, but I don't want them to upload a malicious file and execute it.

Maybe instead I'll just put a few sample items in the uploads/images folder and restrict the upload privileges. Would make my life easier! ;D
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Restricting File Uploads by Type

Post by jmcgin51 »

Time Limited Access is an optional feature of the Uploads module, not something you have to make use of.
Post Reply

Return to “CMSMS Core”