{"service":"file-upload-service","version":"1.0","baseUrl":"https://files-api.relproc.com","context":{"module":"hrms | qms | project | shared (or any slug)","referenceId":"employee / project / record id","documentType":"payslip, sop, drawing, etc."},"r2Key":"{module}/{referenceId}/{documentType}/{uuid}{ext}","endpoints":[{"method":"GET","path":"/health","purpose":"Service health, storage, and limits"},{"method":"GET","path":"/api","purpose":"API catalog"},{"method":"POST","path":"/api/files/upload","purpose":"Upload a file up to 25 MB (multipart/form-data)"},{"method":"POST","path":"/api/files/multipart/init","purpose":"Start a large-file multipart upload"},{"method":"POST","path":"/api/files/multipart/sign-part","purpose":"Mint a presigned URL for one direct-to-R2 chunk PUT"},{"method":"POST","path":"/api/files/multipart/complete","purpose":"Combine chunks and save metadata"},{"method":"POST","path":"/api/files/multipart/abort","purpose":"Abort a multipart upload"},{"method":"GET","path":"/api/files","purpose":"List files. Filter with module, referenceId, documentType"},{"method":"GET","path":"/api/files/:id","purpose":"File metadata and signed view URL"},{"method":"GET","path":"/api/files/:id/view","purpose":"Open/preview the file"},{"method":"GET","path":"/api/files/:id/download","purpose":"Download the file"},{"method":"DELETE","path":"/api/files/:id","purpose":"Delete file from R2 and database"}]}