diff --git a/upload.php b/upload.php index b42bc7d..3662b46 100644 --- a/upload.php +++ b/upload.php @@ -65,8 +65,8 @@ $ext = $allowedMimeToExt[$mime]; $documentRoot = isset($_SERVER['DOCUMENT_ROOT']) ? (string)$_SERVER['DOCUMENT_ROOT'] : ''; $webRoot = rtrim($documentRoot, "\\/"); $targetDir = $webRoot !== '' - ? $webRoot . '/FSST/Website' - : __DIR__ . '/FSST/Website/assets/images/profilePictures'; + ? $webRoot . 'assets/images/profilePictures' + : __DIR__ . 'assets/images/profilePictures'; if (!is_dir($targetDir)) { @@ -97,7 +97,7 @@ if (!move_uploaded_file($tmp, $targetPath)) $lastErr = error_get_last(); $lastErrMsg = (is_array($lastErr) && isset($lastErr['message'])) ? (string)$lastErr['message'] : 'unknown'; error_log('Upload: move_uploaded_file failed to ' . $targetPath . ' - ' . $lastErrMsg); - header('Location: account.php?upload=err'); + header('Location: account.php?upload=err&code=move'); exit(); }