-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: BE endpoint to retrieve presigned URLs (#6685)
* feat: get quarantine presignedurl * test: getPutQuarantinePresignedUrls * refactor: rename endpoint and fns * feat: check if key is a mongodb object id * test: when fieldId is not valid * feat: restrict presigned post validity to 1 min * refactor: endpoint to get-s3-presigned-post-data * feat: better err handling response to client * fix: expiry in test * feat: stricter validation for ids and file size * test: file size limit and new schema * refactor: scope logger to module * feat: configureAws error logging * feat: add logging to check for bucket * revert: "feat: add logging to check for bucket" This reverts commit 0f21dc6. * revert: "feat: configureAws error logging" This reverts commit 13026af. * fix: wrap createPresignedPost with callback * chore: rm unnecessary export * refactor: createPresignedPostDataPromise util * feat: use presigned post expiry env var * fix: path to utils * fix: public-read acl for images and logos * fix: import crypto properly * refactor: shared CreatePresignedPostError in utils * refactor: expiry constant * refactor: use shared CreatePresignedPostError * fix: script to enable bucket versioning * chore: enable versioning for clean bucket * fix: uat and prod virus scanner deployment * fix: broken tests from createPresignedPost promise * fix: s3 service test CopyObjectCommand * feat: joi total file size validator + better msgs * feat: async getting of presigned post data * refactor: rename cleanedResults to okResults * docs: in controller and routes * refactor: rm Promise.all * feat: gate presigned post data endpoint w db flag * fix: joi validate total file size comment * refactor: check for total attachment size in separate step * test: /get-s3-presigned-post-data route * test: if createPresignedPost fails * test: joi validation of /submissions/storage * test: singpass & corppass logins * refactor: use getFeatureFlag in service * chore: add unit tests for getS3PresignedPostData * fix: AttachmentSizeLimitExceededError test * refactor: use getEnabledFlags for /submissions/storage - realised that getFeatureFlag is not suitable, repeated db calls * fix: set status 403 for feature disabled error --------- Co-authored-by: tshuli <[email protected]>
- Loading branch information
1 parent
9d0da42
commit b7c482d
Showing
28 changed files
with
1,676 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.