MCPcopy Create free account
hub / github.com/pollinations/pollinations / createR2Object

Function createR2Object

shared/test/mocks/r2.ts:21–34  ·  view source on GitHub ↗
(key: string, object: StoredR2Object)

Source from the content-addressed store, hash-verified

19 let uploadTime = 0;
20
21 function createR2Object(key: string, object: StoredR2Object): R2Object {
22 return {
23 key,
24 version: "test",
25 size: object.body.byteLength,
26 etag: "test",
27 httpEtag: '"test"',
28 uploaded: object.uploaded,
29 httpMetadata: object.httpMetadata,
30 customMetadata: object.customMetadata,
31 storageClass: object.storageClass,
32 checksums: {},
33 } as unknown as R2Object;
34 }
35
36 return {
37 head: async (key: string) => {

Callers 1

createTestR2BucketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected