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

feat: Revise createFile logic to return modified filenames and location #242

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

AdrianCurtin
Copy link

@AdrianCurtin AdrianCurtin commented Jan 16, 2025

  • Add error handling for key generation
  • Standardize return object with location, url (possibly signed), and filename / key without prefix
  • Add support for optional config parameter to allow getFileLocation to be called internally (prevent a double call from the serverside potentially)
  • Return s3 response explicitly as a separate variable

If parse-community/parse-server#9557 is merged,
this will address #237

This change will affect specific tests that check the response.Location argument and may affect any direct adapter usage of createFile that explicitly uses the s3 server response.

Closes: #237

- Add error handling for key generation
- Standardize return object with location, url, and filename
- Add support for optional config parameter
- Return s3 response explicitly as a separate variable
Copy link

parse-github-assistant bot commented Jan 16, 2025

Thanks for opening this pull request!

@AdrianCurtin AdrianCurtin changed the title Revise createFile logic to preserve key & location bug: Revise createFile logic to preserve key & location Jan 16, 2025
@AdrianCurtin AdrianCurtin changed the title bug: Revise createFile logic to preserve key & location feat: Revise createFile logic to return modified filenames and location Jan 17, 2025
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.33%. Comparing base (0e0d721) to head (5abd18a).
Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
index.js 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
+ Coverage   95.60%   96.33%   +0.72%     
==========================================
  Files           2        2              
  Lines         205      218      +13     
  Branches       44        0      -44     
==========================================
+ Hits          196      210      +14     
+ Misses          9        8       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Objects uploaded with generateKey return incorrect locations
1 participant