Forum OpenACS Development: validating filenames

Collapse
Posted by tammy m on
hi,

Is template::data::validate::filename intended to be used to validate only the initial part of a filename and not the file extension? Because the regexp in this proc does not include the "." character. So I found that I cannot use -datatype filename in creating a file upload widget to automatically validate filenames submitted from users. Is this intended? Should I be using a different -datatype tag to validate filenames in a file widget?

thanks for tips on how the old hands validate file uploads...

Collapse
2: Re: validating filenames (response to 1)
Posted by Trenton Cameron on
I have used this to do validation on mime types

https://openacs.org/forums/message-view?message_id=45045