Added a feature to create copies of file #456
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Code changes:
Created a separate API as the copy method of drive_file.py was buggy.
Added some checks on depth_zero_toggle_is_active, it keeps giving directory error.
When copying multiple files, update_file_size could not handle multiple files at once, so updated code to use sql command.
Issue: When a new frappe doc is created (with content in it), it doesn't set and display the size at first. It sets the size only after modifying the file. So, creating copy of the new doc doesn't copy the content. Fixing that should fix this issue.
Let me know of any bugs or modifications
Fixes #348