okay cool. what would be the best way to save data from a form using the worker and then reroute?
okay cool. what would be the best way to save data from a form using the worker and then reroute?
read() function. Not confirmed in production, it might also get stuck there.api.customerapp.me to my hosted worker api.myapp.ioapi.customerapp.me, so it's not going to match api.myapp.io, hence the need for the wildcard*.<zonename>.com/*, service: none route as suggested in that post to prevent it from applying to your own zone, or I believe you could just create a route per customer domain if you only plan on having a fewonlyIf are unnecessaryuploadedAfter would be the "only upload if the file was uploaded after 1970"
wrangler.toml?

user_data exists?read()api.customerapp.meapi.customerapp.meapi.myapp.ioapi.myapp.io*.<zonename>.com/*onlyIfuploadedAfteruser_dataimport { connect } from 'cloudflare:sockets'
connect(...).socket.readable.getReader().read()const r2_put_prom = c.env.test.put(`test.json`, JSON.stringify({}, null, 2), {
httpMetadata: {
contentType: "application/json; charset=utf-8"
},
customMetadata: {
"sup": "hey"
},
onlyIf: new Headers({
"If-Unmodified-Since": new Date(0).toUTCString()
})
})const r2_put_prom = c.env.test.put(`test.json`, JSON.stringify({}, null, 2), {
httpMetadata: {
contentType: "application/json; charset=utf-8",
"If-Unmodified-Since": new Date(0).toUTCString()
},
customMetadata: {
"sup": "hey"
}
})onlyIf: {
uploadedBefore: new Date(0)
}