Skip to content

Instantly share code, notes, and snippets.

@kikeda1104
Last active July 13, 2018 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kikeda1104/d991a76ca9b1a564eeb584eca56ad8ce to your computer and use it in GitHub Desktop.
Save kikeda1104/d991a76ca9b1a564eeb584eca56ad8ce to your computer and use it in GitHub Desktop.
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