How to use react-s3-uploader - 2 common examples

To help you get started, we’ve selected a few react-s3-uploader 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 founderlab / react-dropzone-s3-uploader / src / DropzoneS3Uploader.js View on Github external
signingUrlQueryParams: this.props.signingUrlQueryParams,
      signingUrlHeaders: this.props.signingUrlHeaders,

      uploadRequestHeaders: this.props.headers || this.props.uploadRequestHeaders,
      contentDisposition: this.props.contentDisposition,

      onProgress: this.onProgress,
      onFinishS3Put: this.onFinish,
      onError: this.onError,

      server: this.props.server || this.props.host || '',
    }, this.props.uploaderOptions)

    if (this.props.preprocess) options.preprocess = this.props.preprocess

    new S3Upload(options) // eslint-disable-line

    this.props.onDrop && this.props.onDrop(files, rejectedFiles)
  }
github jkettmann / universal-react-relay-starter-kit / server / render / setup.js View on Github external
export default function setup(app, done) {
  log('start setup')
  Aws.config.update({
    accessKeyId: process.env.AWS_ACCESS_KEY_ID,
    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
  })

  app.use(noFavicon())
  app.use(helmet())
  app.use(compression())

  app.use('/image', S3Router({
    bucket: process.env.S3_IMAGE_BUCKET,
    region: process.env.AWS_REGION,
    signatureVersion: 'v4',
    headers: { 'Access-Control-Allow-Origin': '*' },
    ACL: 'public-read',
    uniquePrefix: true,
  }))

  if (DEV) {
    const clientConfig = require('../../webpack/client.dev')
    const serverConfig = require('../../webpack/server.dev')
    const webpackDevMiddleware = require('webpack-dev-middleware')
    const webpackHotMiddleware = require('webpack-hot-middleware')
    const webpackHotServerMiddleware = require('webpack-hot-server-middleware')

    const publicPath = clientConfig.output.publicPath

react-s3-uploader

React component that renders a file input and automatically uploads to an S3 bucket

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis

Popular react-s3-uploader functions