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
namespace :storage do | |
desc 'Downloading All Files from AWS - S3' | |
task dump: :environment do | |
verify_environment! | |
ActiveStorage::Blob.establish_connection(:development) | |
ActiveStorage::Blob.find_each do |blob| | |
path = make_path_for(blob.key) | |
if FileTest.exists?(path) | |
puts "ALREADY EXISTS #{blob.key} : => #{blob.filename}" |
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
require 'graphql/client' | |
require 'graphql/client/http' | |
module PlatformGraphqlClient | |
# Configure GraphQL endpoint using the basic HTTP network adapter. | |
HTTP = GraphQL::Client::HTTP.new('http://localhost:3001/api/graphql') do | |
# def headers(context) | |
# # Optionally set any HTTP headers | |
# { "Access-Token": "user-access-token" } | |
# end |