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 change #61

Merged
merged 22 commits into from
Jun 20, 2022
Merged

feat: File change #61

merged 22 commits into from
Jun 20, 2022

Conversation

RezaRahemtola
Copy link
Member

@RezaRahemtola RezaRahemtola commented May 27, 2022

Description

File change feature:
Allow users to change the name of a file and/or it's content.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the needed labels
  • I have linked this PR to an issue
  • I have linked this PR to a milestone
  • I have linked this PR to a project
  • I have tested this code
  • I have added / updated tests (unit / functionals / end-to-end / ...)
  • I have updated the README and other relevant documents (guides...)
  • I have added sufficient documentation both in code, as well as in the READMEs

@RezaRahemtola RezaRahemtola added enhancement New feature or request triage Need to be taged labels May 27, 2022
@RezaRahemtola RezaRahemtola added this to the Storage - File change milestone May 27, 2022
@RezaRahemtola RezaRahemtola requested a review from adrienfort May 27, 2022 14:22
@RezaRahemtola RezaRahemtola linked an issue May 27, 2022 that may be closed by this pull request
4 tasks
@netlify
Copy link

netlify bot commented May 27, 2022

Deploy Preview for nimble-praline-605cf6 failed.

Name Link
🔨 Latest commit d8c39e0
🔍 Latest deploy log https://app.netlify.com/sites/nimble-praline-605cf6/deploys/6290de9ea5e3f90008c1d1f4

@RezaRahemtola RezaRahemtola changed the title feat: Filename update modal feat: File change May 27, 2022
@RezaRahemtola RezaRahemtola changed the base branch from master to dev May 27, 2022 14:22
@RezaRahemtola RezaRahemtola marked this pull request as ready for review June 2, 2022 16:50
Copy link
Member

@lucas-louis lucas-louis left a comment

Choose a reason for hiding this comment

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

LGTM for the code but be careful about the update of the content or infos of the file.

When you update the content of the file, you need to update this content to all of the users who have a shared version of the file.

Because if you want to add a feature of permissions revoke or a list of all users who have access to the shared file, you'll have a problem.

As you update the content of the file, the hash changes and you loose the trace of the shared version. So with theses features, you will not be able to get the infos about the other users who have the old version of the file.

To fix this problem, two choices:

  • Update the content of the file for all of the users with the new version.
  • Create a second version of the file (this version will have the new content/ infos and will not be shared).

ℹ️ The problem is just for the shared files.

⚠️ Think about "delete" the old file when you update it, ONLY if the file is not currently used (not shared or shared but the version is updated with the new version of the file for all of the users).

@RezaRahemtola RezaRahemtola mentioned this pull request Jun 8, 2022
13 tasks
@RezaRahemtola
Copy link
Member Author

LGTM for the code but be careful about the update of the content or infos of the file.

When you update the content of the file, you need to update this content to all of the users who have a shared version of the file.

Because if you want to add a feature of permissions revoke or a list of all users who have access to the shared file, you'll have a problem.

As you update the content of the file, the hash changes and you loose the trace of the shared version. So with theses features, you will not be able to get the infos about the other users who have the old version of the file.

To fix this problem, two choices:

  • Update the content of the file for all of the users with the new version.
  • Create a second version of the file (this version will have the new content/ infos and will not be shared).

information_source The problem is just for the shared files.

warning Think about "delete" the old file when you update it, ONLY if the file is not currently used (not shared or shared but the version is updated with the new version of the file for all of the users).

done, we chose to update the content for all users, and delete the old content only if the new upload and update is successful.

@RezaRahemtola RezaRahemtola linked an issue Jun 13, 2022 that may be closed by this pull request
@RezaRahemtola RezaRahemtola linked an issue Jun 14, 2022 that may be closed by this pull request
@RezaRahemtola RezaRahemtola merged commit 6d70265 into dev Jun 20, 2022
@adrienfort adrienfort deleted the feat/file-change branch June 21, 2022 16:33
@lucas-louis lucas-louis linked an issue Dec 23, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Need to be taged
Projects
None yet
4 participants