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

Add support for copying a specific version of a file #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmkash
Copy link

@dmkash dmkash commented Dec 12, 2022

The Box API supports passing in the ID of a file version to copy. We have a need to ensure that if a file is being copied, the original (first) version is the one that is copied, no matter how many versions of the original there may be.

I used a kwarg because that's how name is handled, then added it to the attributes that are sent in the copy request only if an ID was provided.

@dmkash dmkash changed the title Add support for fetching annotations for a specific file Add support for copying a specific version of a file Dec 12, 2022
Copy link
Collaborator

@xhocquet xhocquet left a comment

Choose a reason for hiding this comment

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

Hey @dmkash , thanks for the contribution! This change seems safe enough, but to merge I would love to see the param used and verified in the smoke tests in https://github.com/cburnette/boxr/blob/master/spec/boxr/files_spec.rb#L106. Any chance you could add that in?

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.

2 participants