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

B-21937: Allow Doc Uploads/Downloads with Commas #14509

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

Conversation

TevinAdams
Copy link
Contributor

@TevinAdams TevinAdams commented Jan 3, 2025

B-21937

Summary

Users were not able to view nor download files uploaded with commas in their filenames.
This was because if there was a comma in the file name then it was saved into S3 with the comma in the file name and in the DB with the comma in the file name.
This means whenever we would send an HTTP request to fetch the file from S3 the comma would be in the url causing an issue.
To solve this issue the filename within the content disposition needed to be wrapped in double quotes.

Is there anything you would like reviewers to give additional scrutiny?

this article explains more about the approach used.

Verification Steps for the Author

These are to be checked by the author.

  • Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
  • Have the Agility acceptance criteria been met for this change?

Verification Steps for Reviewers

These are to be checked by a reviewer.

  • Has the branch been pulled in and checked out?
  • Have the BL acceptance criteria been met for this change?
  • Was the CircleCI build successful?
  • Has the code been reviewed from a standards and best practices point of view?

Setup to Run the Code

How to test

Setup your local to use S3 as storage.

How to setup to use S3 for storage

  1. Access MilMove as a customer
  2. In orders and other file upload places upload a file with a comma in the file name. (Example: FIRST, LAST - ISM AUTHORIZATION)
  3. As a customer try downloading the file again
  4. Complete the move as a customer
  5. As a SC, when counseling the move attempt to download the file
  6. Finish counseling the move

Frontend

  • There are no aXe warnings for UI.
  • This works in Supported Browsers and their phone views (Chrome, Firefox, Edge).
  • There are no new console errors in the browser devtools.
  • There are no new console errors in the test output.
  • If this PR adds a new component to Storybook, it ensures the component is fully responsive, OR if it is intentionally not, a wrapping div using the officeApp class or custom min-width styling is used to hide any states the would not be visible to the user.
  • This change meets the standards for Section 508 compliance.

Backend

Database

Any new migrations/schema changes:

  • Follows our guidelines for Zero-Downtime Deploys.
  • Have been communicated to #g-database.
  • Secure migrations have been tested following the instructions in our docs.

Screenshots

image
image

@TevinAdams TevinAdams added Mountain Movers Movin' Mountains 1 Sprint at a time INTEGRATION Slated for Integration Testing labels Jan 3, 2025
@TevinAdams TevinAdams self-assigned this Jan 3, 2025
@TevinAdams TevinAdams requested a review from a team as a code owner January 3, 2025 16:53
Copy link
Contributor

@brianmanley-caci brianmanley-caci left a comment

Choose a reason for hiding this comment

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

It worked for me.

image

pkg/storage/s3.go Show resolved Hide resolved
Copy link
Contributor

@danieljordan-caci danieljordan-caci left a comment

Choose a reason for hiding this comment

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

Should you also be updating pkg/storage/test/s3.go?

@TevinAdams
Copy link
Contributor Author

Should you also be updating pkg/storage/test/s3.go?

@danieljordan-caci I saw that. I think that is supposed to mirror the actual Presigned URL method for S3. Ill update it.

@TevinAdams
Copy link
Contributor Author

Should you also be updating pkg/storage/test/s3.go?

That file has been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INTEGRATION Slated for Integration Testing Mountain Movers Movin' Mountains 1 Sprint at a time
Development

Successfully merging this pull request may close these issues.

4 participants