krsr
02/10/2023, 5:43 AMstavros-k
02/10/2023, 8:09 AMHardAtWork
02/10/2023, 8:18 AMstavros-k
02/10/2023, 8:20 AMHardAtWork
02/10/2023, 8:22 AMstavros-k
02/10/2023, 8:25 AMfrankichiro
02/10/2023, 8:32 AMfrankichiro
02/10/2023, 8:53 AMjcovert
02/10/2023, 4:44 PMwrangler dev <path to index.ts> --test-scheduled
, it runs - though then of course my pages aren't hosted (as it's not a pages run).
Or if my question should be asked elsewhere, that would be helpful to know tooDaveMurphySF
02/10/2023, 5:03 PMjs
const obj = { hello: 'world' };
const blob = new Blob([JSON.stringify(obj, null, 2)], {
type: 'application/json',
});
const r2Obj = await ctx.env.PUBLIC_BUCKET.put(uuid(), blob); // This throws an empty exception
console.log(JSON.stringify(r2Obj, null, 4));
kian
02/10/2023, 5:05 PMDaveMurphySF
02/10/2023, 5:17 PMjgarr
02/11/2023, 7:32 AMjgarr
02/11/2023, 7:38 AMWalshy | Pages
02/11/2023, 1:13 PMjgarr
02/11/2023, 9:42 PMHardAtWork
02/11/2023, 9:44 PMjs
ctx.env.KV.put(“key”, “value”);
jgarr
02/11/2023, 9:45 PMHardAtWork
02/11/2023, 9:45 PMctx
is present within the Function handler.HardAtWork
02/11/2023, 9:46 PMjs
export async function onRequest(ctx) {
await ctx.env.KV.put(“key”, “value”);
// Do something else
}
jgarr
02/11/2023, 9:56 PMDeem
02/13/2023, 6:28 PMizznatsir
02/13/2023, 10:22 PMizznatsir
02/13/2023, 10:23 PMkian
02/13/2023, 10:25 PMkian
02/13/2023, 10:25 PMizznatsir
02/13/2023, 10:29 PMizznatsir
02/13/2023, 10:31 PMizznatsir
02/13/2023, 10:34 PMHardAtWork
02/13/2023, 10:36 PM