MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / ConfirmUpload

Method ConfirmUpload

docs/test-csharp-snippets/Module.cs:321–332  ·  view source on GitHub ↗

Client uploads directly to S3 using the pre-signed URL, then calls:

(ReducerContext ctx, string filename, string s3Key)

Source from the content-addressed store, hash-verified

319
320 // Client uploads directly to S3 using the pre-signed URL, then calls:
321 [SpacetimeDB.Reducer]
322 public static void ConfirmUpload(ReducerContext ctx, string filename, string s3Key)
323 {
324 ctx.Db.Document.Insert(new Document
325 {
326 Id = 0,
327 OwnerId = ctx.Sender,
328 Filename = filename,
329 S3Key = s3Key,
330 UploadedAt = ctx.Timestamp,
331 });
332 }
333
334 private static string GeneratePresignedUrl(string s3Key, string contentType)
335 {

Callers

nothing calls this directly

Calls 1

InsertMethod · 0.45

Tested by

no test coverage detected