Django Fans,

Could someone point me towards some examples of validating the 
filenames/types of uploaded files?  Digging through the list archives I 
came across a post from 2006:

http://groups.google.com/group/django-users/browse_thread/thread/ebe1768bce0a01e3/

which has an example of a custom filenameEndsWith validator.  The poster 
felt it was an "ugly" example, and asked if there was a better way to 
handle the validation.  But, I couldn't find any replies.  Is there a 
better way?

I'm about to set up a model with a FileField and will want to only allow 
pdf documents to be uploaded.  Also, I'd probably also want to prevent 
files with spaces in their names from being uploaded.  Any 
examples/suggestions are welcomed.



Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to