-
Notifications
You must be signed in to change notification settings - Fork 302
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 file upload by adding an npm package that uses rust and aws sdk for rust to upload. #7955
Conversation
…nto rs-rust-file-upload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I Tested
media types
type | result |
---|---|
png | pass |
jpg | pass |
pass | |
pptx | pass |
doc | pass |
- image variants are generated
- image variants display on aws as expected
upload types
case | result |
---|---|
single image | pass |
multiple images | pass |
single file | pass |
multiple files | pass |
multiple images and files | pass |
Issue
Looks like the new upload script is appending the size twice for each image upload: test-upload-3-9-24-2024_w400_400.png
. It should read: test-upload-3-9-24-2024_w400.png
.
Suggestion
Can we remove sizes 200
& 400
and just use 800
& 1200
. We can then merge #7908 changes to fit with these updates.
Idea
@RileySeaburg Should we consider updating the upload code to generate webp
only going forward?
6e318d3
to
2c52c75
Compare
2c52c75
to
4f9991d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing
I tested file and image uploading.
- image name is
test-upload-3-9-24-2024_w400.png
as expected - creates
800,1200
variants and original only
Thanks @RileySeaburg.
Looks like the commits from CirceCI are not signed. Since @hursey013 isn't on digital.gov anymore we can probably update the commit scripts to use one of ours. |
Summary
Simplified file upload and added npm package to upload the files as a rust process.
Preview
Link to Preview
Solution
Updated Upload method to call a rust function
Simplified gulp script to no longer have separate process and upload functions.
Click here for original rust source code
Multiple Image Upload
File Upload
Link to uploaded excel.file
How To Test
Note
Ensure you are using wsl or mac, or ubuntu lts.
npx gulp upload
Dependency updates