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) => {
3737 throw createError ( { statusCode : 400 , statusMessage : 'Invalid content-range header' } )
3838 }
3939
40+ // TODO find a better way to calculate chunk size
4041 // this should be the correct chunk size except for the last chunk
41- const chunkSize = Math . floor ( start / ( end - start ) )
4242 // 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 )
4544
4645 const adapter = await useStorageAdapter ( )
4746 await adapter . uploadChunk ( {
You can’t perform that action at this time.
0 commit comments