fix: override MIME type for PDF uploads & fix build errors

- Fix PDF upload failing on Android due to wrong MIME type (image/pdf → application/pdf)
- Add safe JSON parsing for external storage responses with incorrect Content-Type headers
- Add detailed upload logging for debugging (file name, type, size, response status)
- Fix TypeScript error: missing prisma import in forum preview-report-posting route
- Fix ESLint warning: unescaped apostrophe in support-center page
- Add DEBUG_UPLOAD_FILE.md documentation for troubleshooting guide

Fixes upload issue where Android devices couldn't upload PDF files due to MIME type mismatch

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-04-14 15:17:45 +08:00
parent a71997b4ef
commit 38239c52d6
4 changed files with 297 additions and 15 deletions

View File

@@ -1,3 +1,4 @@
import { prisma } from "@/lib";
import { NextResponse } from "next/server";
export async function GET(