send bijlage ook bij new ww

This commit is contained in:
Liesbeth ter Schure
2022-03-22 10:05:04 +01:00
parent c7d3b41480
commit a7ca14bdc1
4 changed files with 32 additions and 13 deletions
@@ -463,13 +463,12 @@ class Organisaties extends MY_Controller{
$orgID = $_POST['orgID'];
$filename = $_FILES['file']['name'];
$this->deleteOldBijlage($orgID);
if ( ! $this->upload->do_upload('file')) $error = $this->upload->display_errors();
else {
$error = FALSE;
$randomname = $this->upload->data('file_name')['file_name'];
$this->deleteOldBijlage($orgID);
$randomname = $this->upload->data('file_name');
$this->setNieuweBijlage($orgID, $randomname, $filename);
}
$this->json($error);