🔧 Alpine.js 변수 오류 수정 및 PDF 미리보기 간소화

🐛 Alpine.js 오류 수정:
- PDF 관련 변수들 (pdfZoom, pdfLoading, pdfCurrentPage 등) 제거
- HTML 뷰어 변수들 유지 (htmlLoading, htmlRawMode, htmlSourceCode)
- 중복 변수 정의 제거

📱 PDF 미리보기 간소화:
- PDF.js Canvas 렌더링 → iframe 방식으로 변경
- 복잡한 줌/페이지 네비게이션 제거
- 브라우저 내장 PDF 뷰어 활용
- 401 Unauthorized 오류 해결을 위한 토큰 처리

🎯 성능 및 안정성 개선:
- PDF.js 워커 설정을 HTML에서 전역으로 처리
- 불필요한 JavaScript 함수들 제거
- 메모리 누수 방지를 위한 리소스 정리
- 에러 처리 간소화

 사용자 경험:
- 더 빠른 PDF 로딩
- 브라우저 기본 PDF 컨트롤 사용 가능
- Alpine.js 경고 메시지 제거
- 안정적인 미리보기 동작
This commit is contained in:
Hyungi Ahn
2025-09-02 17:17:07 +09:00
parent 960ee84356
commit 5f9fe07317
3 changed files with 24 additions and 205 deletions

View File

@@ -510,6 +510,7 @@ async def get_document_content(
@router.get("/{document_id}/pdf")
async def get_document_pdf(
document_id: str,
token: Optional[str] = Query(None),
current_user: User = Depends(get_current_active_user),
db: AsyncSession = Depends(get_db)
):