Infrastructure high complexity backend
0
Dependencies
1
Dependents
3
Entities
0
Integrations

Description

Backend object storage adapter for securely persisting receipt images. Stores uploaded files in S3-compatible object storage with references saved to the expense_receipts database table. Implements virus scanning on ingest, generates secure pre-signed URLs for retrieval, and enforces file type validation server-side as a second layer of defence.

Feature: Receipt Photo Upload

receipt-storage

Responsibilities

  • Store receipt images in S3-compatible object storage
  • Generate and manage secure pre-signed URLs for retrieval
  • Run virus scanning on uploaded files
  • Enforce server-side file type and size validation
  • Link stored objects to expense_receipts database records

Interfaces

storeReceipt(expenseId, fileBuffer, metadata)
getReceiptUrl(receiptId)
deleteReceipt(receiptId)
scanFile(fileBuffer)
validateFileServer(fileBuffer, contentType)
generatePresignedUrl(objectKey, expiresIn)
listReceiptsForExpense(expenseId)
getStorageUsage(organizationId)

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component