fix(fetch-http-handler): handle empty blob in browsers#1199
Merged
AllanZhengYP merged 4 commits intoaws:masterfrom May 26, 2020
Merged
fix(fetch-http-handler): handle empty blob in browsers#1199AllanZhengYP merged 4 commits intoaws:masterfrom
AllanZhengYP merged 4 commits intoaws:masterfrom
Conversation
169d16b to
4775326
Compare
This comment has been minimized.
This comment has been minimized.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Contributor
Author
|
Tested with with Amplify Storage component(code snippet below) locally on Firefox and Chrome: const { Storage, Amplify } = require("aws-amplify");
Amplify.configure({
Storage: {
AWSS3: {
bucket: "bucket",
region,
identityPoolId: IDENTITY_POOL_ID,
},
},
});
await Storage.put("abcd"); |
trivikr
requested changes
May 26, 2020
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
trivikr
reviewed
May 26, 2020
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
trivikr
approved these changes
May 26, 2020
packages/fetch-http-handler/src/stream-collector.browser.spec.ts
Outdated
Show resolved
Hide resolved
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
trivikr
approved these changes
May 26, 2020
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #1198
This PR fixes the issue with returning none base64 encoded data for empty blob in browser.
The original
readToBase64()instreamCollectorfromfetch-http-handlerwas migrated fromstream-collector-nativepackage which was only intended to be used in ReactNative environment. It handles empty blobs fine in ReactNative, but misses unit test for the case. When thestream-collector-nativeis merged intofetch-http-handler, it can also be used in browser runtime, which can have different behavior from different browser vendors. This results untested behavior in browser runtime./cc @Amplifiyer
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.