eleter progres fix 08/08/24

This commit is contained in:
2024-07-08 11:59:15 +07:00
parent 5ac16ae928
commit c3bff35638
255 changed files with 16865 additions and 2167 deletions
+8 -2
View File
@@ -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;
}