How to add filename validation for Google Drive uploads on Joget cloud?
Hello All.
When uploading a file using the Google Drive plugin (we are on Joget Cloud - DX8), how can we check that the filename is valid and, if not, return an error upon the completion of the upload?
For example, given the screenshot below:
We want it so that the file titled screenshot-2023-11-24 103352.png is not flagged with an error, whereas the filename below (which has image but followed by symbols) should be flagged as not valid, despite also being .png.
We tried adding this regex to the file upload control, but it doesn't seem to work:
^(?!_)[\x21-\x7E\u0E00-\u0E7F\u0E50-\u0E59]{1,250}$
What happens is that, as you can see from the above screenshot, it flags both uploaded files, which is not correct.
We need the filenames to only be accepted based on the following:
ASCII characters only:
Underscores permitted but not as the first character
Maximum length of 250 characters
Thai characters and numbers
Any help is much appreciated - thank you.
