1a872222 by Marty Penner

Point notification attachment uploads to the right directory. refs #1375

1 parent 1483f044
......@@ -83,12 +83,14 @@ function display_page() {
$text = $_POST['text'];
$html = $_POST['html'];
$attachments = array();
$upload_dir = __DIR__ . "/uploads/";
$upload_dir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR;
fixFilesArray($_FILES['attachment']);
foreach ($_FILES['attachment'] as $position => $file) {
// should output array with indices name, type, tmp_name, error, size
if($file['name'] != "") {
move_uploaded_file($file['tmp_name'],$upload_dir . $file['name']);
move_uploaded_file($file['tmp_name'], $upload_dir . $file['name']);
$attachments[] = $file['name'];
}
}
......