files-sdk@2.3.1
Patch Changes
-
048612d: Fix the
files-sdk/apiproxy download returning a 500 for a suffixRangerequest (bytes=-N) against an empty object. The header resolved to an inverted byte range that the SDK rejected as invalid; the gateway now answers416 Range Not SatisfiablewithContent-Range: bytes */0, as it already did for other unsatisfiable ranges. -
048612d: Fix
tiering()buffering the whole object on a cross-tiercopy/moveand ontier(). The transfer read the source with a plaindownload(), which buffers the body on most adapters, so a large object was materialized in memory before being re-uploaded — contradicting the plugin’s streaming contract. The source is now read withas: "stream", so cross-tier transfers stream end to end. -
c67d482: Widen optional peer dependency ranges:
@nestjs/commonnow accepts v12,node-appwriteaccepts v27 and v28, andpocketbaseaccepts v0.27 and v0.28. -
eaf2df1: r2: default to the
"fetch"client inside Cloudflare Workers. The"aws-sdk"client’s XML parsing needs aDOMParser, which workerd doesn’t provide, so it failed at runtime on the first list or error-body parse. Detection isnavigator.userAgent === "Cloudflare-Workers"(or the workerd-onlyWebSocketPairglobal whennavigatoris disabled); an explicitclient: "aws-sdk"or aDOMParserpolyfill on the global keeps the aws-sdk engine.A Worker that had the aws-sdk client working now gets the fetch engine’s narrower surface unless it opts back in:
multipartand resumablecontroluploads throw,ReadableStreambodies are buffered before a single PUT, bulk deletes fan out per key instead of oneDeleteObjects, keys with./..segments are rejected,signedUploadUrl({ maxSize })throws, andfiles.rawis an aws4fetchAwsClientrather than anS3Client.New
files-sdk/s3-fetchsubpath:s3Fetch()exposes the same SigV4 fetch engine for any S3-compatible endpoint (AWS S3, MinIO, Tigris, …) on runtimes wherefiles-sdk/s3can’t run. Static credentials withAWS_*env fallbacks,forcePathStylefor services without per-bucket DNS, no@aws-sdk/*peers.