geocity
geocity copied to clipboard
backend check for additional file extension restrictions
Quick implementation of an additional backend check for cases where the browser do not recognize the additional extension restrictions.
TODOs @AlexandreJunod :
- [x] Bring the validation error correctly to the user
- [ ] Write a test. For quick test, just change
field.allowed_file_types="blablabla"and you'll see the validation in action
@monodo Can't reproduce the error in a test, as we don't know the real reason of the error, and it's probably due to a web navigator. The actual version of the code will output the following in case form validation isn't working.
messages.error( request, _("Une erreur est survenue lors de l'upload de fichier."), )
If actual code is OK for you, we can merge