File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -652,13 +652,15 @@ export class R2Registry implements Registry {
652652 if ( env . PUSH_COMPATIBILITY_MODE === "full" ) {
653653 const [ stream1 , stream2 ] = limit ( stream , size ) . tee ( ) ;
654654 const partTask = upload . uploadPart ( state . parts . length + 1 , stream1 ) ;
655-
655+ // We can totally disable this, however we are risking that the client sends another small chunk.
656+ // Maybe instead we can throw range error
656657 const dateInOneHour = new Date ( ) ;
657658 dateInOneHour . setTime ( dateInOneHour . getTime ( ) + 60 * 60 * 1000 ) ;
658659 const headers = {
660+ // https://www.rfc-editor.org/rfc/rfc1123 date format
661+ // Objects will typically be removed from a bucket within 24 hours of the x-amz-expiration value.
659662 "x-amz-expiration" : dateInOneHour . toUTCString ( ) ,
660663 } as const ;
661-
662664 const r2RegistryObjectTask = env . REGISTRY . put ( path , stream2 , {
663665 httpMetadata : new Headers ( headers ) ,
664666 customMetadata : headers ,
You can’t perform that action at this time.
0 commit comments