Repository navigation
feat: SDK update for version 18.1.0 - #115
Conversation
|
|
|
||
| if (file.size <= Client.CHUNK_SIZE) { | ||
| return await this.call(method, url, headers, originalPayload); | ||
| if (file.size <= Client.CHUNK_SIZE || responseType === 'text') { |
There was a problem hiding this comment.
Text uploads bypass chunking If a caller uses the public
chunkedUpload method with a text response and a file larger than 5 MB, this condition sends the whole file in one request. It also skips onProgress, so the caller loses progress updates and the upload may fail if the server limits single-request size. Keep large-file chunking independent of the response format.
Knowledge Base Used: Client configuration and HTTP transport
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/client.ts
Line: 1217
Comment:
**Text uploads bypass chunking** If a caller uses the public `chunkedUpload` method with a text response and a file larger than 5 MB, this condition sends the whole file in one request. It also skips `onProgress`, so the caller loses progress updates and the upload may fail if the server limits single-request size. Keep large-file chunking independent of the response format.
**Knowledge Base Used:** [Client configuration and HTTP transport](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-console/-/docs/sdk-client-and-transport.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| value !== null && | ||
| typeof value === 'object' | ||
| ) { | ||
| formData.append(key, JSONbig.stringify(value)); |
There was a problem hiding this comment.
Transport changes lack behavior tests Multipart objects are now serialized as JSON, and successful text responses are returned as raw strings, but neither behavior has a test. A multipart request with object attributes and a text response from
chat or getZone should be checked through observable results; type-checking cannot catch a wrong field value or return value.
Knowledge Base Used: Client configuration and HTTP transport
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/client.ts
Line: 1178
Comment:
**Transport changes lack behavior tests** Multipart objects are now serialized as JSON, and successful text responses are returned as raw strings, but neither behavior has a test. A multipart request with object attributes and a text response from `chat` or `getZone` should be checked through observable results; type-checking cannot catch a wrong field value or return value.
**Knowledge Base Used:** [Client configuration and HTTP transport](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-console/-/docs/sdk-client-and-transport.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
This PR contains updates to the SDK for version 18.1.0.
What's Changed
deno-1.21,deno-1.24anddeno-1.35fromRuntimeandBuildRuntimeenumsAssistant.chatnow returns the response text as astringinstead of{ message }Domains.getZonenow returns the zone file as astringinstead of{ message }[object Object]