page:recipes:asset library:asp net core:attachments

Host asset library with ASP.NET Core: file attachments

Overview

Deploy an asset library built with ASP.NET Core on Ample using the browser file uploads pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL, a private S3-compatible bucket holds objects with credentials delivered as encrypted environment variables. Verified on ASP.NET Core: content-type and size validation that rejects disallowed files, an object written to a private bucket and a row linking the record to the object key (reject=ok upload=ok linked=ok). Not separately tested: your upload UI, allowed types, size limits and virus scanning; treat the asset library-specific behavior as your application code.

Representative Queries

Resource Requirements

Infrastructure Requirements

  1. Compute: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
  2. Postgres: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
  3. S3-compatible object storage: Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary. Other S3 operations are not verified.

Execution Status

Prerequisites

Workflow Steps

Step 1: Build and Start

Step 2: Implement the Pattern on PostgreSQL

Step 3: Wire Object Storage

Step 4: Deploy

Step 5: Verify

Limitations

Cost Estimate

Evidence Summary

  1. ASP.NET Core pattern fixture deployed on Ample (dotnet publish -c Release -o out in the builder, then dotnet .dll on the dotnet-10 template with ASPNETCORE_URLS bound to PORT); checks passed for browser-file-uploads and configuration-secrets.
  2. The same ASP.NET Core app deployed with a --release-command migration; the marker it created was readable after activation.

Next Actions