Skip to content
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

fix(Storage): allowing to set an empty value as prefix for the S3 Key #931

Merged
merged 5 commits into from
May 29, 2018

Conversation

MrIceman
Copy link
Contributor

@MrIceman MrIceman commented May 28, 2018

Issue #, if available:
Fixes #853
Description of changes:
Old implementation does not allow to have NO prefix for requested S3 Resource-Keys at all. When setting customPrefix{public: ''} the customPrefix is being set to 'public/', however the prefix should be an empty string

const x = '' || 'something else'; is equivalent to const y = undefined || 'something else';

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@MrIceman MrIceman requested a review from nidsharm as a code owner May 28, 2018 13:20
@codecov-io
Copy link

codecov-io commented May 28, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@a69c29e). Click here to learn what that means.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #931   +/-   ##
=========================================
  Coverage          ?   87.48%           
=========================================
  Files             ?       78           
  Lines             ?     3707           
  Branches          ?      684           
=========================================
  Hits              ?     3243           
  Misses            ?      441           
  Partials          ?       23
Impacted Files Coverage Δ
packages/aws-amplify/src/Storage/Storage.ts 97.01% <75%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a69c29e...f0db0e5. Read the comment docs.

@MrIceman
Copy link
Contributor Author

I have added unit tests. It seems like there are many more tests missing for Storage.ts

@mlabieniec mlabieniec changed the title allowing to set an empty value as prefix for the S3 Key fix(Storge): allowing to set an empty value as prefix for the S3 Key May 28, 2018
@mlabieniec mlabieniec changed the title fix(Storge): allowing to set an empty value as prefix for the S3 Key fix(Storage): allowing to set an empty value as prefix for the S3 Key May 28, 2018
Copy link
Contributor

@powerful23 powerful23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS Storage - protection level changes the key used to retrieve our image from S3
4 participants