Fix: Profile picture upload issues and improved error handling

- account_settings.php: Show success message before reloading page (with 1.5s delay)
- upload_profile_picture.php: Reorder require statements for proper initialization, add file error code to error message
This commit is contained in:
twotalesanimation
2025-12-04 15:59:49 +02:00
parent 0c068eeb69
commit 59c1e37d5c
4 changed files with 13 additions and 7 deletions

View File

@@ -175,11 +175,11 @@ $user = $result->fetch_assoc();
}
if (response.status === 'success') {
// Update the profile picture source with cache-busting query string
// Reload the current page
window.location.reload();
$('#responseMessage').html('<div class="alert alert-success">' + response.message + '</div>');
// Reload the current page after a short delay
setTimeout(function() {
window.location.reload();
}, 1500);
} else {
$('#responseMessage').html('<div class="alert alert-danger">' + response.message + '</div>');
}