Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
class CollectionResourcesService
|
|
|
|
def initialize
|
|
|
|
@storage_service = if FeatureToggle.local_storage?
|
|
|
|
Storage::LocalDiskService.new
|
|
|
|
else
|
|
|
|
Storage::S3Service.new(Configuration::EnvConfigurationService.new, ENV["COLLECTION_RESOURCES_BUCKET"])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def get_file(file)
|
|
|
|
@storage_service.get_file(file)
|
|
|
|
rescue StandardError
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def get_file_metadata(file)
|
|
|
|
@storage_service.get_file_metadata(file)
|
|
|
|
rescue StandardError
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|