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

feat: file upload (minio, s3, frontend...) #443

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

yoannfleurydev
Copy link
Member

@yoannfleurydev yoannfleurydev commented Jan 12, 2024

Describe your changes

closes #<issue_id>

Simplified version of the Avatar Upload process :
image

Notes :

  • To upload a file in a different folder on the bucket, the path should be included in the key of the file

Left to do / Lines of thought

  •  (IN A FUTURE PR) How do we handle upload of sensitive files (i.e with restricted access) ? Because currently, the files uploaded are public and the url is permanent.
  • (IN A FUTURE PR) How do we keep track (on the server) of the different files uploaded ?
  • Summarize the existing logic for a better understanding
  • (IN A FUTURE PR) There is currently no way of deleting a file from the Frontend
  1. Simplify, clean and remove unused parts to get the existing part working and as simple as possible. (For know, just focus on public file upload for avatars and we'll see later for the rest.
  2. Rebase to get the React-hook-form update
  3. Update the fields
  4. Only leave what is necessary for upload an account avtar

Screenshots

Documentation

Checklist

  • I performed a self review of my code
  • I ensured that everything is written in English
  • I tested the feature or fix on my local environment
  • I ran the pnpm storybook command and everything is working
  • If applicable, I updated the translations for english and french files

Copy link

vercel bot commented Jan 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
start-ui ❌ Failed (Inspect) May 24, 2024 4:02pm

Copy link

sonarcloud bot commented Jan 12, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ntatoud
Copy link
Contributor

ntatoud commented Apr 8, 2024

TODO :

  • Upload multiple files ??
  • Verify file types => Any file can be uploaded as an avatar
  • Maybe improve README with new modifications ?

@ntatoud
Copy link
Contributor

ntatoud commented May 6, 2024

Here is the idea for the refactor I did in commit : refactor(file-upload): Remove hook abstraction layer and regroup feature's files

image

src/files/utils.ts Outdated Show resolved Hide resolved
src/files/utils.ts Outdated Show resolved Hide resolved
src/files/utils.ts Outdated Show resolved Hide resolved
src/server/config/s3.ts Outdated Show resolved Hide resolved
src/features/account/AccountProfileForm.tsx Show resolved Hide resolved
Copy link
Member

@ivan-dalmet ivan-dalmet left a comment

Choose a reason for hiding this comment

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

E2E tests are failing

Copy link

sonarcloud bot commented May 24, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants