Dears,
I have a form, user can uploads max 5 files. hv action to rename the file to username_YYYYMMDDHis_1, 2,3.....
Finally will email all the files to client....
It works fine expect when user upload file with special char.....
Actually I wont use the same file name in my email or database, but if I upload files with invalid file name, it got problems and some files may be missing.
Case for example,
Files to be uploaded: abc.jpg, abc 123.jpg, abc%^*123.jpg
Final files in email will be: abc.jpg, abc 123.jpg, abc 123.jpg
I think I should add javascript @ onload, but can't find any source code which can work as what I expected.
(I need the file name without whitespaces, no special char and english char only)
The file field in my form for ref.:
Best regards,
Wing
I have a form, user can uploads max 5 files. hv action to rename the file to username_YYYYMMDDHis_1, 2,3.....
Finally will email all the files to client....
It works fine expect when user upload file with special char.....
Actually I wont use the same file name in my email or database, but if I upload files with invalid file name, it got problems and some files may be missing.
Case for example,
Files to be uploaded: abc.jpg, abc 123.jpg, abc%^*123.jpg
Final files in email will be: abc.jpg, abc 123.jpg, abc 123.jpg
I think I should add javascript @ onload, but can't find any source code which can work as what I expected.
(I need the file name without whitespaces, no special char and english char only)
The file field in my form for ref.:
<input name="file1" id="file1" class="form-control gcore-height-auto A" title="" style="" multiple="0" data-load-state="" data-tooltip="" type="file" />
<input name="file2" id="file2" class="form-control gcore-height-auto A" title="" style="" multiple="0" data-load-state="" data-tooltip="" type="file" />
Best regards,
Wing