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.

EE1:x: Limit MIME Type on file upload

January 14, 2011 1:34pm

Subscribe [3]
  • #1 / Jan 14, 2011 1:34pm

    StayInTouch

    16 posts

    I’m using nGen file field to allow users to upload a .CSV file that then gets imported by CSVGrab. The issue I’m running into is that users are uploading other files besides .csv. I’ve got the upload folder set to receive all file types and I found out about the mimes.php file. However, even after removing the other file types I didn’t want its still allowing them to be uploaded.

    The other interesting thing is that CSV is not a file type listed in the array of the mimes.php yet it is uploaded without any errors. Is there anything I can do so that clients can’t upload other file types? Any suggestions/directions would be helpful.

    I’m using EE 1.6.9.

    Thanks,

    Chad Boswell

    Moved to CodeShare Corner by Moderator

  • #2 / Jan 14, 2011 6:40pm

    Sue Crocker

    26054 posts

    Hi, Chad. You’d need to contact the author of the add-on for support on this. Moving to the CodeShare Corner in the mean time.

  • #3 / Jan 26, 2011 11:18am

    StayInTouch

    16 posts

    Sue,

    I did contact nGen Works regarding the file upload and this is what I got back:

    “Chad, nGen File doesn’t use mime types to limit files. It uses the built in mechanisms to allow all files or images only, this is the only limiting possible with nGen File. There is no option to limit to only CSV files.”

    It seems to me then that nGen File uses the built in settings from the upload directory.

    So, is it true that if the directory is set to allow all file types to be uploaded, the allowed file types are controlled by the mimes.php file? Also, it should only allow files to be uploaded that are listed in the array?

    Thanks,

    Chad Boswell

  • #4 / Apr 01, 2011 2:56am

    ACER

    4 posts

    Hi Chad

    We are experiencing the same issue (EE 1.6.7), have you found a fix for this?

    David

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

ExpressionEngine News!

#eecms, #events, #releases