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
feat: file upload (minio, s3, frontend...) #443
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
0305a22
to
2ec53e9
Compare
TODO :
|
bfda1a2
to
88c14de
Compare
Here is the idea for the refactor I did in commit : refactor(file-upload): Remove hook abstraction layer and regroup feature's files |
src/files/utils.ts
Outdated
> | ||
) => | ||
async ( | ||
file?: File, |
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.
why the file is optional ? can we make it required ? (I don't see a use case where we call uploadFile without a file ^^)
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.
We have to check at one point if the file retrieved from the form is empty or not.
The choice was made to handle the 'file is undefined' case in this function but could be moved in the form, before making the call to the mutation ?
Let me know what you think is best ?
# Conflicts: # docker-compose.yml
tested with R2 from Cloudflare # Conflicts: # .env.example
4352848
to
48a85ea
Compare
Quality Gate passedIssues Measures |
|
||
// Here we can use '!' on mockFile.name to prevent TS error because we are sure it is defined | ||
const input = screen.getByLabelText<HTMLInputElement>(mockFile.name!); | ||
await user.upload(input, mockFile.file ?? []); |
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.
Reminder : Remove this line, it was copy pasted from the other test and should not be here
Describe your changes
closes #<issue_id>
Simplified version of the Avatar Upload process :
Notes :
key
of the fileLeft to do / Lines of thought
Screenshots
Documentation
Checklist
pnpm storybook
command and everything is working(If you cannot update the french language, just let us know in the PR description)