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

Added the Copy / Move to functionality on the ISite interface #814

Merged
merged 2 commits into from
Apr 6, 2022

Conversation

MathijsVerbeeck
Copy link
Contributor

@MathijsVerbeeck MathijsVerbeeck commented Apr 5, 2022

Added the possiblity on the Site object to migrate files / folders in the current site collection or between different site collections. Also added the possibility to check the progress and a function that will wait until all the jobs have finished

Added functions:

  • CreateCopyJobs(Async)
  • GetCopyJobProgress(Async)
  • EnsureCopyJobHasFinished(Async)

Issue ref: #414

Mathijs Verbeeck added 2 commits April 5, 2022 22:57
… the current site collection or between different site collections. Also added the possibility to check the progress and a function that will wait until all the jobs have finished
@jansenbe
Copy link
Contributor

jansenbe commented Apr 6, 2022

Wow, that was fast @MathijsVerbeeck! Thanks again for the great work, this is another great addition for PnP Core SDK!

@jansenbe jansenbe self-assigned this Apr 6, 2022
@jansenbe jansenbe added the area: model 📐 Related to the core SDK models label Apr 6, 2022
@MathijsVerbeeck
Copy link
Contributor Author

@jansenbe I just thought about maybe adding some documentation/checks about the limitations (max 2gb/item, max 100 files and max 100gb in total) but al struggling about 'how' to check for the filesizes because that would mean that I'll have to retrieve every file and get the filesize of this file. This would generate quite a bit of traffic. Any suggestions on how to do this?

jansenbe added a commit that referenced this pull request Apr 6, 2022
@jansenbe jansenbe merged commit 57024ff into pnp:dev Apr 6, 2022
@jansenbe
Copy link
Contributor

jansenbe commented Apr 6, 2022

@MathijsVerbeeck : I would just do this via documentation. SDK users that want to enforce this can perform size checks in their code, enforcing this on every SDK user will be overkill for most use cases I think.

Just merged your PR, did a few tweaks but overall very good job done again! One thing that can trick contributors is the fact that the test project can access the internal classes from the SDK, so that's why I moved from ICopyMigrationOptions and an internal CopyMigrationOptions class to a public CopyMigrationOptions class. Other small change I did is ensuring the delay inbetween status checks is always configurable. Needed that to avoid having to wait during test cases.

@MathijsVerbeeck MathijsVerbeeck deleted the CrossSiteCopyOrMove branch May 8, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: model 📐 Related to the core SDK models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants