002-secure-file-upload #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "002-secure-file-upload"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[1.0.0-rc.9] - 2026-05-11
Added
POST /api/v1/applications/:applicationId/files— multipart upload endpoint (PDF/DOC/DOCX/TXT, max 10MB).GET /api/v1/applications/:applicationId/files/:fileId/download— streamed download from MinIO.DELETE /api/v1/applications/:applicationId/files/:fileId— delete document metadata + MinIO object (best-effort cleanup).MinioClientService) with auto bucket creation on startup.ConfigModule(minio.config.ts).@fastify/multipartregistered in Fastify for multipart form handling.applications/<applicationId>/<type>/<uuid>.<ext>.ALLOWED_MIME_TYPES,ALLOWED_EXTENSIONS,MIME_TO_EXTENSION).Changed
FilesServicenow uses MinIO for file storage instead of accepting client-suppliedfilePath.FilesControllerdocument download now returns NestJSStreamableFileinstead of callingFastifyReply.send()with a raw stream, so headers and body are handled consistently by the Fastify adapter (includingfastify.injectin E2E tests).FilesControllerupload endpoint changed from JSON body to multipart form-data.DocumentResponseDtostill returnsfilePathbut it now contains a MinIO object key.CreateDocumentDtorefactored:filePath,fileSize,mimeTypeare no longer client-supplied..attach()for file operations instead of JSON body.run-e2e.sh) already provisions MinIO bucketjobs-tracker-e2e.Dependencies
minio(MinIO JavaScript SDK) to runtime dependencies.@fastify/multipartto runtime dependencies.Fixed
fastify.injectwhen piping MinIO streams manually; resolved by usingStreamableFile.test/jest-e2e.json: settestTimeoutto 120000 ms so slow bootstrap hooks (DB, MinIO) do not hit the default 5 s Jest hook limit.applications/<appId>/prefix via batchlistObjects+removeObjects, instead of querying DB rows one-by-one.