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 move! #26

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

Add move! #26

wants to merge 1 commit into from

Conversation

JoeSouthan
Copy link
Contributor

Move file from one place to another

lib/file_storage.rb Outdated Show resolved Hide resolved
lib/file_storage.rb Outdated Show resolved Hide resolved
@JoeSouthan JoeSouthan force-pushed the joesouthan/move-file branch 2 times, most recently from 5a7278a to c53dfe6 Compare February 10, 2021 15:06
@JoeSouthan JoeSouthan force-pushed the joesouthan/move-file branch from c53dfe6 to 084dfbf Compare May 26, 2021 10:55
README.md Show resolved Hide resolved
old_file = get_bucket(bucket).file(key)
destination_bucket = get_bucket(new_bucket)
file.copy(destination_bucket.name, new_key)
old_file.delete
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to delete the folder as well if this was the only file left inside? I imagine the real case here is that we don't want to see the folder in the list output if it's empty (since it wouldn't happen in services like GCS)

lib/file_storage/key_storage.rb Show resolved Hide resolved
@JoeSouthan JoeSouthan force-pushed the joesouthan/move-file branch 2 times, most recently from add589d to 831dd05 Compare May 26, 2021 14:59
@JoeSouthan JoeSouthan force-pushed the joesouthan/move-file branch from 831dd05 to ec3af1e Compare June 28, 2021 14:56
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.

3 participants