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 upload to handle attributes FilePath, FileName #133

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

tatiana-nspcc
Copy link
Contributor

When we receive headers, they are automatically formatted from any case to
only the first letter being uppercase. For example, FilePath transforms into
Filepath. However, NEOFS is case-sensitive for these attributes, which is why
we intentionally change them to CamelCase style. We hope this is a temporary
workaround and will be removed asap.
Connected to nspcc-dev/neofs-http-gw#255.

Also redundant constant attributeFilePath is removed.

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (12aef0d) 13.85% compared to head (35d2033) 14.18%.
Report is 3 commits behind head on master.

Files Patch % Lines
handlers/objects.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #133      +/-   ##
==========================================
+ Coverage   13.85%   14.18%   +0.32%     
==========================================
  Files          11       11              
  Lines        2374     2383       +9     
==========================================
+ Hits          329      338       +9     
  Misses       2013     2013              
  Partials       32       32              

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

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

This behavior MUST be documented in the API.

When we receive headers, they are automatically formatted from any case to
only the first letter being uppercase. For example, `FilePath` transforms into
`Filepath`. However, NEOFS is case-sensitive for these attributes, which is why
we intentionally change them to CamelCase style. We hope this is a temporary
workaround and will be removed asap.
Connected to nspcc-dev/neofs-http-gw#255.

Signed-off-by: Tatiana Nesterenko <[email protected]>
This constant already exists in `object` package.

Signed-off-by: Tatiana Nesterenko <[email protected]>
@roman-khimov roman-khimov merged commit ec9cdfb into master Feb 7, 2024
13 checks passed
@roman-khimov roman-khimov deleted the fix-filepath branch February 7, 2024 12:44
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.

2 participants