appyter icon indicating copy to clipboard operation
appyter copied to clipboard

Filefield file extension constraints

Open mjjeon opened this issue 5 years ago • 1 comments

It would be good to set acceptable file extensions in FileFields. If you set it only to accept txt or csv file formats, when a user tries to load a file with other file formats then appyter can alert the user can't load that file.

mjjeon avatar Dec 15 '20 16:12 mjjeon

Related to #40 Assuming you express your filename constraints as a regex, for example:

FileField(
  ...,
  constraint=r'\.(txt|csv|tsv)$',
  ...,
)

This will prevent things server side, but with #40 we can translate this into a front-end validator as well.

u8sand avatar Dec 15 '20 16:12 u8sand