File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
routes/_apis/artifactcache/caches Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,10 @@ export default defineEventHandler(async (event) => {
37
37
throw createError ( { statusCode : 400 , statusMessage : 'Invalid content-range header' } )
38
38
}
39
39
40
+ // TODO find a better way to calculate chunk size
40
41
// this should be the correct chunk size except for the last chunk
41
- const chunkSize = Math . floor ( start / ( end - start ) )
42
42
// this should handle the incorrect chunk size of the last chunk by just setting it to the limit of 10000 (for s3)
43
- // TODO find a better way to calculate chunk size
44
- const chunkIndex = Math . min ( chunkSize , 10_000 )
43
+ const chunkIndex = Math . min ( Math . floor ( start / ( end - start ) ) , 9999 )
45
44
46
45
const adapter = await useStorageAdapter ( )
47
46
await adapter . uploadChunk ( {
You can’t perform that action at this time.
0 commit comments