-
Notifications
You must be signed in to change notification settings - Fork 2
File upload endpoint #205
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
File upload endpoint #205
Conversation
Adds an upload endpoint to our API. This has been implemented using multer as a middleware for file validations and restrictions on file size. Basic happy/unhappy flow tests pass.
Increases coverage threshold based on updated test suite Updates the types used in lib/users to match updated API types Generated updated Swagger
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Add validations on file type and size
To gradually clean up the repo, we agreed on restructuring helpers from utils to more cleanly scoped libs. Additionally, added some tests
pheuberger
left a comment
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.
I have some preliminary feedback on the controller. I haven't reviewed the tests yet and the later commits, but wanted to share already.
|
@bitbeckers small pdfs(<1MB) were fine at all. |
Updates the UploadController to use custom errors. The custom errors are defined in a uploads lib directory and handles all cases found in the controller.
Updates the UploadController typedoc example to document different upload tools and the expected responses
Adds typeguards and updates the parsing of failed and successful file uploads for readability
Updates the test cases to test on the expanded upload result types. Additionally typedoc documentation was updated to document the error and the controller more accurately.
Issues created #205 (comment) |
pheuberger
left a comment
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.
Nice, looks very clean. All my comments are non-blocking, so feel free to merge any time!
|
Sorry @pheuberger but I need to resolve all non-blocking comments because they block the PR |
The goal of this PR is to provide a basic IPFS upload endpoint to self-reported evaluations on hypercerts data. Primarily, it should allow impact creators to provide updates on the data represented withing an hypercert, like evaluation reports or proof of work/attendance/etc..