Last active
July 13, 2018 06:44
-
-
Save kikeda1104/d991a76ca9b1a564eeb584eca56ad8ce to your computer and use it in GitHub Desktop.
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
def call | |
source_files.each do |source_file| | |
@adapter.upload_file(folder: "#{@directory}/#{id}", file: splits_dir.join(source_file.name).to_s) | |
end | |
remove_files | |
end | |
private | |
def post_initialize(args) | |
@adapter = FileStorage::Adapter.new | |
@directory = Model.to_s.underscore | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment