page:recipes:form collection:asp net core:attachments

Host form collection with ASP.NET Core: file attachments

Deploy a form collection 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 form collection-specific behavior as your application code.

Representative Queries

Resource Requirements

Infrastructure Requirements

Prerequisites

  1. A ASP.NET Core project that builds and starts with the documented commands (dotnet publish -c Release -o out in the builder, then dotnet .dll on the dotnet-10 template with ASPNETCORE_URLS bound to PORT)
  2. A PostgreSQL driver reading DATABASE_URL at runtime (auto-provisioned when omitted, or supplied with --env)
  3. A bucket from ample bucket create with its credentials passed as encrypted S3_* environment variables
  4. An Ample account token with servers:write, databases:read, buckets:read

Workflow Steps

Build and start

Implement the pattern on PostgreSQL

Wire object storage

Deploy

Verify

Cost Estimate

Limitations

Examples

ASP.NET Core pattern fixture