-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@uppy/aws-s3: clarify and warn when incorrect buckets settings are used #5505
Merged
Conversation
This file contains 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
when CORS is not setup properly on the bucket, it would just fail silently. now it will show the warning again (because location/etag may also be `undefined`)
that will never use multipart and `s3` will auto-detect (which is the default anyways)
Diff output filesdiff --git a/packages/@uppy/aws-s3/lib/index.js b/packages/@uppy/aws-s3/lib/index.js
index d49a27a..b6c9105 100644
--- a/packages/@uppy/aws-s3/lib/index.js
+++ b/packages/@uppy/aws-s3/lib/index.js
@@ -500,12 +500,12 @@ export default class AwsS3Multipart extends BasePlugin {
etag,
location,
} = headersMap;
- if (method.toUpperCase() === "POST" && location === null) {
+ if (method.toUpperCase() === "POST" && location == null) {
console.warn(
"AwsS3/Multipart: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.",
);
}
- if (etag === null) {
+ if (etag == null) {
reject(
new Error(
"AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.", |
2 tasks
needed for s3
Murderlon
reviewed
Nov 11, 2024
Murderlon
changed the title
Upload url missing
@uppy/aws-s3: clarify and warn when incorrect buckets settings are used
Nov 11, 2024
Merged
github-actions bot
added a commit
that referenced
this pull request
Nov 11, 2024
| Package | Version | Package | Version | | --------------- | ------- | --------------- | ------- | | @uppy/aws-s3 | 4.1.2 | @uppy/tus | 4.1.4 | | @uppy/companion | 5.1.4 | uppy | 4.7.0 | | @uppy/locales | 4.3.0 | | | - @uppy/aws-s3: clarify and warn when incorrect buckets settings are used (Mikael Finstad / #5505) - @uppy/tus: fix event upload-success response.body.xhr (ItsOnlyBinary / #5503) - @uppy/companion: Enable CSRF protection in grant (OAuth2) (Mikael Finstad / #5504) - @uppy/locales: Add ms_MY (Malay) locale (Salimi / #5488)
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.
fixes #5388
also:
s3
will auto-detect (which is the default anyways)