geocity icon indicating copy to clipboard operation
geocity copied to clipboard

backend check for additional file extension restrictions

Open monodo opened this issue 1 year ago • 1 comments

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 avatar May 21 '24 10:05 monodo

@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

AlexandreJunod avatar May 24 '24 07:05 AlexandreJunod