Created
January 13, 2016 14:34
-
-
Save carolyncole/6f43908cf7829601ab78 to your computer and use it in GitHub Desktop.
Changing the content of a file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gf = GenericFile.find("abc123") | |
file = File.open("file name") | |
content = file.read | |
gf.content.content = content | |
gf.create_derivatives | |
gf.visibility = "open" | |
gf.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment