-
-
Save jayanthdeejay/cdd77f6b3156d3cff3d216ce9ca79d46 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