Bug #2888
[HR-Personal Data]perbaikan pada master data personal PA01 untuk membuatkan validasi nama file attachment
0%
Description
dear tim developer mohon support nya untuk perbaikan pada md personal data dimana jika ada nama file attachment pakai special character tidak boleh di upload. harus ada validasi karena berpengaruh ke report organization chart jadi tidak bisa di view report
Files
Updated by Kezia Pawitra Yulianti 4 months ago
- Due date changed from 07/24/2024 to 07/26/2024
- Status changed from New to Assigned
- Assignee changed from Kezia Pawitra Yulianti to M Azid Wahyudi
- Priority changed from Normal to High
Updated by M Azid Wahyudi 3 months ago
- File clipboard-202409021139-x0gpj.png clipboard-202409021139-x0gpj.png added
- Status changed from Assigned to QA Test
- Assignee changed from M Azid Wahyudi to Muhammad Bintar
dear masbin , udah bisa di test ya
package :
maxFileSize = Ext.ComponentQuery.query('uploadfile[name=' + targetField_ + ']')[0].maxFileSize;
Ext.ComponentQuery.query('[name=FileMax]')[0].setValue(maxFileSize);
var form = Ext.ComponentQuery.query('form[name=FormFileUpload]')[0].getForm();
uploadfilename = form.monitor.items.items0.value
uploadfilenameSub = uploadfilename.substring(uploadfilename.lastIndexOf('\\') + 1);
fileName = uploadfilenameSub.split('.').shift();
var regex = /^[a-zA-Z0-9\s]*$/;
var invalidChars = fileName.split('').filter(char => !regex.test(char)).join('');
if (invalidChars.length > 0) {
var message = `File name contains special characters: ${invalidChars}.`;
Ext.Msg.alert('Invalid File Name', message);
return;
}
note : kalau mau deploy ke client lain infoin aja biar gw aja yang deploy
makasih