WordPress.org

Ready to get started?Download WordPress

Forums

Cimy User Extra Fields
Restricting the file type to PDf or JPEG/JPG (5 posts)

  1. Selmab
    Member
    Posted 1 year ago #

    Hi Marco and all!

    I'd like to have a field type "file" in the registration form. Could you tell me how can i restrict the file type the user can upload to .PDf and .JPEG/.JPG files for example?

    Otherwise, it could be dangerous to let users upload any kind of files like .exe and then you may find them in the database.

    Thank you very much for your feedback.

    S

    http://wordpress.org/extend/plugins/cimy-user-extra-fields/

  2. Marco Cimmino
    Member
    Plugin Author

    Posted 1 year ago #

    Since v2.3.9 the plug-in follows whatever WordPress allows, exe are not allowed I think, so there is no worry about it.

  3. Selmab
    Member
    Posted 1 year ago #

    great! Thank you

  4. Selmab
    Member
    Posted 1 year ago #

    However, where and how can i make a check that the file is only .pdf or .jpepg/.jpg file ?

    Thank you

  5. Marco Cimmino
    Member
    Plugin Author

    Posted 1 year ago #

    You can add white listed extensions in the equalTo rule like written in the top of Add a Field section.
    However looks like it only prevents it from a JavaScript point of view, not in the backend, so is a fake protection. Might fix it if really needed.

    Note: WordPress should have a front-end to configure this, WordPress MS for example has it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.