Prompt for upload re-auth on demand

This commit is contained in:
cyph3rasi
2026-03-07 18:29:18 -08:00
parent 28eb46d653
commit 76ca21e14f
4 changed files with 328 additions and 77 deletions
+13
View File
@@ -0,0 +1,13 @@
export async function refreshStorageSession(password: string): Promise<void> {
const res = await fetch('/api/storage/session', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ password }),
});
const data = await res.json().catch(() => ({}));
if (!res.ok) {
throw new Error(data.error || 'Failed to confirm password');
}
}