Fix student questions pages: CSS tokens, scroll, upload guard, S3 path
- Replace non-existent --surface/--surface-muted/--border-strong with actual design-system tokens (--color-surface, --background, --foreground, --muted) - Remove tmp/ segment from S3 upload key in question-upload route - Add auto-scroll to bottom on new message in QuestionThread - Block Send while file upload is in progress (uploading guard) - Replace <a> with Next.js <Link> in new question page back-link - Replace hardcoded #c00 error color with var(--destructive) in both files - Replace hardcoded #E8E8E0/#F5F5F0 hex backgrounds with CSS tokens
This commit is contained in:
@@ -35,7 +35,7 @@ export async function POST(req: NextRequest) {
|
||||
return NextResponse.json({ error: "Недопустимое расширение файла" }, { status: 415 });
|
||||
}
|
||||
|
||||
const key = `questions/tmp/${session.user.id}/${randomUUID()}.${ext}`;
|
||||
const key = `questions/${session.user.id}/${randomUUID()}.${ext}`;
|
||||
const buffer = Buffer.from(await file.arrayBuffer());
|
||||
const url = await uploadFile(key, buffer, file.type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user