File Size & Type Validation

  • Matt Hennessy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 7 months ago #70491 by Matt Hennessy
File Size & Type Validation was created by Matt Hennessy
On the membership form I'd like to restrict the file type and file size for a file upload field, but I'm having trouble finding documentation that tells me how to do this. If I only want to allow PDF's that are smaller than 2 MB, how would I do this?

Thanks!

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #70506 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic File Size & Type Validation
Hi Matt

At the moment, we don't have file size limitation, unfortunately. This is something we will add support for in the future, however, to be honest, it will take us about 4 weeks to have this feature implemented in the extension

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Matt Hennessy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #70549 by Matt Hennessy
Replied by Matt Hennessy on topic File Size & Type Validation
Ok, thanks Tuan. It just seems like a pretty scary security hole to allow users to upload absolutely anything to the website with no validation at all (file extension/type or file size), so I think we'll hold off on this until you've released a feature along these lines.

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #70568 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic File Size & Type Validation
Hi Matt

Infact, the extension does validate the file type, it just doesn't validate the file size at the moment yet. As I said, I will address this limitation, please be patient and wait for us

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Matt Hennessy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #70570 by Matt Hennessy
Replied by Matt Hennessy on topic File Size & Type Validation
Oh, great! Apologies if I misread your earlier message. Can you tell me how to validate file type?

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #70571 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic File Size & Type Validation
Go to Membership pro -> Configuration, there is a config option called Allowed File Types, you can enter the field types you want users to be able to upload there and only these file types are allowed

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Matt Hennessy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #70572 by Matt Hennessy
Replied by Matt Hennessy on topic File Size & Type Validation
Thanks Tuan, much appreciated!

Please Log in or Create an account to join the conversation.