show proper error on phone when photo ID upload fails to MinIO
This commit is contained in:
parent
7ef509c247
commit
e0fc4810d1
2 changed files with 4 additions and 3 deletions
|
|
@ -169,9 +169,9 @@ router.post("/api/v1/id-upload/:token", async (req: Request, res: Response) => {
|
|||
paths.front = minioPath;
|
||||
console.log(`[id-upload] Stored ${minioPath} (${buffer.length} bytes)`);
|
||||
} else {
|
||||
// Fallback: store base64 reference in DB
|
||||
paths.front = `base64-pending:${buffer.length}bytes`;
|
||||
console.warn("[id-upload] MinIO upload failed — stored reference only");
|
||||
console.error("[id-upload] MinIO upload failed for", minioPath);
|
||||
res.status(500).json({ error: "Upload failed — please try again, or upload the file from your computer instead." });
|
||||
return;
|
||||
}
|
||||
|
||||
// Update token
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
<div style="font-size:32px;margin-bottom:8px">❌</div>
|
||||
<p style="font-size:16px;font-weight:600;color:#991b1b">Upload Failed</p>
|
||||
<p id="error-msg" style="font-size:13px;color:#7f1d1d;margin-top:8px"></p>
|
||||
<p style="font-size:12px;color:#7f1d1d;margin-top:8px">If the problem continues, you can upload your ID from the intake form on your computer instead.</p>
|
||||
<div class="actions">
|
||||
<button type="button" id="retry-btn" class="btn-outline">Try Again</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue