Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (process.env.S3_ACCESS_KEY &&
process.env.S3_SECRET_KEY &&
process.env.S3_BUCKET) {
var directAccess = !!+(process.env.S3_DIRECT);
filesAdapter = new S3Adapter(
process.env.S3_ACCESS_KEY,
process.env.S3_SECRET_KEY,
process.env.S3_BUCKET,
{directAccess: directAccess});
} else if (process.env.GCP_PROJECT_ID &&
process.env.GCP_KEYFILE_PATH &&
process.env.GCS_BUCKET) {
var directAccess = !!+(process.env.GCS_DIRECT);
filesAdapter = new GCSAdapter(
process.env.GCP_PROJECT_ID,
process.env.GCP_KEYFILE_PATH,
process.env.GCS_BUCKET,
{directAccess: directAccess});
} else if (process.env.AZURE_ACCOUNT &&
process.env.AZURE_CONTAINER &&
process.env.AZURE_ACCESS_KEY) {
var directAccess = !!+(process.env.AZURE_DIRECT);
filesAdapter = new AzureStorageAdapter(
process.env.AZURE_ACCOUNT,
process.env.AZURE_CONTAINER,
{
accessKey: process.env.AZURE_ACCESS_KEY,
directAccess: directAccess
});