ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to limit file formats allowed in safecracker file field

May 30, 2012 12:34pm

Subscribe [1]
  • #1 / May 30, 2012 12:34pm

    Mindvolt

    14 posts

    Is there any way to restrict the file formats allowed by the Safecracker file field beyond setting the upload directory to Images only? I have a Safecracker field for uploading videos that I’d like to be able to prevent people from submitting non-video formats.

    I noticed in the docs that there is a mime types file in the EE configs, but would altering this affect any file upload across the entire system?

  • #2 / May 31, 2012 11:00am

    Dan Decker

    7338 posts

    Hi Mindvolt,

    Thank you for posting to the forums!

    noticed in the docs that there is a mime types file in the EE configs, but would altering this affect any file upload across the entire system?

    That would effect the entire system.

    One solution for now would be to validate the filetype on the client side using JavaScript. I also invite you to make a Feature Request for expanded MIME control options on Upload Destinations.

    Is there anything else I can assist you with?

    Cheers,

  • #3 / May 31, 2012 11:34am

    Mindvolt

    14 posts

    I’ve posted a feature request about this issue and can work around it for now.

    Thanks

    Josh @ Mindvolt

  • #4 / Jun 01, 2012 5:57pm

    Dan Decker

    7338 posts

    Hey Josh,

    Thanks for the Feature Request!

    If there’s anything else, just let us know.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases