How to use @uppy/companion - 3 common examples

To help you get started, we’ve selected a few @uppy/companion 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 metaspace2020 / metaspace / metaspace / graphql / src / modules / webServer / storageServer.ts View on Github external
bucket: config.upload.bucket,
        region: config.aws.aws_region,
        useAccelerateEndpoint: false,  // default: false,
        expires: 300,  // default: 300 (5 minutes)
        acl: 'private',  // default: public-read
      }
    },
    server: {
      host: `localhost:${config.img_storage_port}`,
      protocol: 'http',
      path: '/database_upload',
    },
    filePath: '/tmp',
    debug: true,
  };
  app.use('/database_upload', bodyParser.json(), companion.app(options));
  companion.socket(httpServer, options);

  logger.info(`Storage server is listening on ${config.img_storage_port} port...`);
  return httpServer;
}
github metaspace2020 / metaspace / metaspace / graphql / src / modules / webServer / storageServer.ts View on Github external
region: config.aws.aws_region,
        useAccelerateEndpoint: false,  // default: false,
        expires: 300,  // default: 300 (5 minutes)
        acl: 'private',  // default: public-read
      }
    },
    server: {
      host: `localhost:${config.img_storage_port}`,
      protocol: 'http',
      path: '/database_upload',
    },
    filePath: '/tmp',
    debug: true,
  };
  app.use('/database_upload', bodyParser.json(), companion.app(options));
  companion.socket(httpServer, options);

  logger.info(`Storage server is listening on ${config.img_storage_port} port...`);
  return httpServer;
}
github transloadit / uppy / packages / @uppy / companion / examples / serverless / index.js View on Github external
secret: process.env.GOOGLE_SECRET
    },
    dropbox: {
      key: process.env.DROPBOX_KEY,
      secret: process.env.DROPBOX_SECRET
    }
  },
  server: {
    host: host,
    protocol: protocol
  },
  filePath: '/tmp',
  secret: process.env.UPPY_SECRET
}

app.use(companion.app(options))

app.get('/', (req, res) => {
  res.setHeader('Content-Type', 'text/plain')
  res.send("Hello there, here's a response from companion")
})

const server = awsServerlessExpress.createServer(app)

exports.companion = (event, context) =>
  awsServerlessExpress.proxy(server, event, context)

@uppy/companion

OAuth helper and remote fetcher for Uppy's (https://uppy.io) extensible file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox and Google Drive, S3 and more :dog:

MIT
Latest version published 9 days ago

Package Health Score

92 / 100
Full package analysis

Popular @uppy/companion functions