Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before deploying
NEXT_PUBLIC_GOOGLE_API_KEYandNEXT_PUBLIC_GOOGLE_APP_IDwere already optional in practice;with
GOOGLE_ENABLED="false"they can now be dropped from the root.enventirely.What's in it
Are you using a Stream of unknown length as the Body of a PutObject request?on every call. The zero-byte prefix marker was written withBody: '', andthe SDK's content-length middleware guards on
if (body && …)— an empty string is falsy, so itnever set
Content-Length, andcheckContentLengthHeaderthen flagged the request as anunmeasured stream.
Buffer.alloc(0)is truthy with a length of0, so the header goes out andthe warning is gone. Dropping
Bodyaltogether does not work:undefinedis falsy too.uploadFilehas always gone throughUploadfrom@aws-sdk/lib-storage, exactly as the warning suggests.openPicker()reads its env first and throws a named error on an empty API key, beforeloading the gapi script and before minting a Picker token.
handleManageFoldersalready funnelsit through
extractApiErrorMessage, so it surfaces as a toast; the message says the variable isbuild-time, because the fix is a rebuild and not a restart.
them: the API omits
drivefromGET /storage/statusand the sidebar'shasDrivenever rendersthe entry point. Both
.env.examplefiles now say so, the wayGOOGLE_ENABLEDdocuments its ownkill-switch.
setAppIdstays behind itsif (appId)guard, so deployments running without a projectnumber keep working.
Verification
pnpm build,pnpm lint, 242 unit and 101 e2e pass — unchanged counts: the marker fixtightened an existing
createFoldertest rather than adding one. It asserted onlyBucketandKeythroughtoMatchObject, so it would not have caught the regression.finalizeRequest, so no S3 isneeded):
Body: ''warns,Body: Buffer.alloc(0)does not, omittingBodywarns.Content-Length: 0is what AWS, MinIO and R2 already expectfor prefix markers, so only the log line changes.
docker compose configwith both Picker lines deleted from the root.envresolves them to""and emits no warning; the empty value was traced through the compose default, the Dockerfile
ARG/ENV, Next's build-time inline andgetEnvString, which returns''for bothundefinedand
"".