Commit Graph

2 Commits

Author SHA1 Message Date
ffa01ebeb7 feat(api): direct multipart upload endpoints for filesystem backend
Add three new endpoints that bypass the MinIO presigned URL flow:
- POST /api/items/{pn}/files/upload — multipart file upload
- POST /api/items/{pn}/thumbnail/upload — multipart thumbnail upload
- GET /api/items/{pn}/files/{fileId}/download — stream file download

Rewrite frontend upload flow: files are held in browser memory on drop
and uploaded directly after item creation via multipart POST. The old
presign+associate endpoints remain for MinIO backward compatibility.

Closes #129
2026-02-17 13:04:44 -06:00
Forbes
3358e7dd1c feat(web): add FileDropZone component with upload progress
New files:
- web/src/hooks/useFileUpload.ts: presigned upload hook that gets
  a presigned PUT URL from POST /api/uploads/presign then uploads
  via XMLHttpRequest for progress tracking
- web/src/components/items/FileDropZone.tsx: drag-and-drop file
  upload zone with file list, type-colored badges (CAD/PDF/IMG),
  progress bars, and remove buttons

Features:
- Dashed border drop zone with drag-over visual feedback
- Click to browse or drag files to add
- File type detection by extension with colored badges
- Upload progress bar (2px mauve) during active uploads
- Error state display per file
- Configurable accepted file types via accept prop

Closes #14
2026-02-07 10:13:18 -06:00