eleter progres fix 08/08/24
This commit is contained in:
@@ -5,11 +5,17 @@ $surat_id = $_POST['surat_id_uploadz'];
|
||||
$folder = "pdf";
|
||||
|
||||
// Cek apakah file yang diupload adalah PDF atau Dokumen Word
|
||||
$allowed_types = array('application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document');
|
||||
$allowed_types = array(
|
||||
'application/pdf',
|
||||
'application/msword',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
);
|
||||
$file_type = $_FILES["input_load_cvz"]["type"];
|
||||
|
||||
if (!in_array($file_type, $allowed_types)) {
|
||||
$response = array('status' => 'error', 'message' => 'File yang diupload tidak diizinkan. Hanya file PDF dan Dokumen Word yang diperbolehkan.');
|
||||
$response = array('status' => 'error', 'message' => 'File yang diupload tidak diizinkan. Hanya file PDF dan Dokumen Word, Excel yang diperbolehkan.');
|
||||
echo json_encode($response);
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user