Better attempt at finding the object
This commit is contained in:
parent
8803c7473a
commit
0cddcbf4a9
@ -41,7 +41,9 @@ export async function onRequestPost(context: RequestContext) {
|
|||||||
|
|
||||||
for (const attachment of coconutData.attachments) {
|
for (const attachment of coconutData.attachments) {
|
||||||
const token = crypto.randomUUID();
|
const token = crypto.randomUUID();
|
||||||
const objectMeta = await context.env.R2.head(`t/${attachment}`);
|
const objectMeta = (
|
||||||
|
await context.env.R2.list({ prefix: `t/${attachment}.` })
|
||||||
|
).objects.at(0);
|
||||||
|
|
||||||
if (!objectMeta) continue;
|
if (!objectMeta) continue;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user