Project

General

Profile

Bug #2888

[HR-Personal Data]perbaikan pada master data personal PA01 untuk membuatkan validasi nama file attachment

Added by Muhammad Bintar 5 months ago. Updated 3 months ago.

Status:
QA Test
Priority:
High
Start date:
07/17/2024
Due date:
07/26/2024 (about 4 months late)
% Done:

0%

Estimated time:
Spent time:

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

clipboard-202409021139-x0gpj.png (230 KB) clipboard-202409021139-x0gpj.png M Azid Wahyudi, 09/02/2024 11:39 AM
#1

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
#2

Updated by M Azid Wahyudi 3 months ago

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

Also available in: Atom PDF