Project

General

Profile

Bug #3344

[HR-Employee]Personal Data tambahkan validasi pada saat upload foto dengan nama special character.

Added by Muhammad Bintar 6 days ago. Updated 6 days ago.

Status:
Closed
Priority:
Normal
Start date:
01/15/2025
Due date:
01/21/2025
% Done:

0%

Estimated time:
Spent time:

Description

sesuai redmine http://remote.minovais.com:3000/redmine/issues/2888

mohon untuk di buatkan validasi pada saat upload foto dengan nama special character.

aplikasi http://remote.minovais.com:61115/

database di remote.minovais.com, 1452
Pertalife Prod


Files

sdsds ((.jpg (62.3 KB) sdsds ((.jpg Muhammad Bintar, 01/15/2025 01:53 PM
clipboard-202501151409-kohjd.png (157 KB) clipboard-202501151409-kohjd.png Muhammad Bintar, 01/15/2025 02:09 PM
#1

Updated by Muhammad Bintar 6 days ago

#2

Updated by M Azid Wahyudi 6 days ago

  • Status changed from New to QA Test
  • Assignee changed from M Azid Wahyudi to Muhammad Bintar

dear masbin , udah bisa di test ya

package :
Xtype

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;
}

makasih

#3

Updated by Muhammad Bintar 6 days ago

sudah di deploy ke client

Also available in: Atom PDF