Created
January 15, 2019 08:08
-
-
Save 3014zhangshuo/0dc966da467b75a86a264b15794e19ef to your computer and use it in GitHub Desktop.
FileIO: Writing strings as Carrierwave uploads
This file contains hidden or 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
class FileIO < StringIO | |
def initialize(stream, filename) | |
super(stream) | |
@original_filename = filename | |
end | |
attr_reader :original_filename | |
end | |
# https://makandracards.com/makandra/50526-fileio-writing-strings-as-carrierwave-uploads |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment