huhu
huhu
CDCloudflare Developers
Created by huhu on 8/28/2023 in #workers-help
is it possible to upload large file (5gb) to r2 using worker?
Hi Team, we are using worker to upload small file (less than 100mb) to r2, can we use stream to upload larger file which will prevent exceeds the limit?
3 replies
CDCloudflare Developers
Created by huhu on 8/21/2023 in #workers-help
find the http response size of a worker
we are using r2 in an worker with sample code from here: https://developers.cloudflare.com/r2/examples/demo-worker/ we plan to use send the response metrics to workers analytics engine.
const cache = caches.default
const cacheKey = new Request(url.toString(), {
headers: request.headers, method: 'GET' // Make HEAD requests cacheable
})
let response = await cache.match(cacheKey)
const cache = caches.default
const cacheKey = new Request(url.toString(), {
headers: request.headers, method: 'GET' // Make HEAD requests cacheable
})
let response = await cache.match(cacheKey)
but for the response from cache, it seemed we cannot easily find the content-length header or is there any other way to find the size of this response from cache? thanks in advance
1 replies