How to use the parse-server.GCSAdapter function in parse-server

To help you get started, we’ve selected a few parse-server examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yongjhih / docker-parse-server / index.js View on Github external
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
        });