Last active
August 31, 2018 12:04
-
-
Save bvjebin/252ddfb08acb77944c1f838f7e9cd46e to your computer and use it in GitHub Desktop.
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
def export_download_zip_email(data, email) do | |
tmp_folder_name = "users_"<>Random.random_string(8) | |
path = File.cwd!<>"/tmp/"<>tmp_folder_name | |
:ok = File.mkdir_p!(path) | |
csv_path = export_to_csv(data, path) | |
download_images(data, path) | |
zip_path = create_zip(data, path) | |
send_email(email, csv_path, zip_path) | |
File.rm_rf path | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment