erirawan

Upload-file-s3

Jun 7th, 2018
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import Dropzone from 'react-dropzone';
  3. import axios from 'axios';
  4. import aws from 'aws-sdk';
  5. import { withStyles } from 'material-ui';
  6.  
  7. const config = {
  8.     accessKeyId: 'AKIAIR5A7D37NJEKSERA',
  9.     secretAccessKey: 'wUUteQbXjSpqxBV9C0cmt8QtKxemUwfbvrVQ9d7Y'
  10. };
  11.  
  12. const s3 = new aws.s3();
  13. const myBucket = 'ekantin-data-csv'
  14. class Dashboard extends React.Component {
  15.     state = {
  16.         value: 0
  17.     };
  18.  
  19.     onDrop = () => {};
  20.  
  21.     render() {
  22.         return (
  23.             <Dropzone onDrop={this.onDrop}>
  24.                 <div>Drop some files here!</div>
  25.             </Dropzone>
  26.         );
  27.     }
  28. }
  29.  
  30. Dashboard.propTypes = {
  31.     classes: PropTypes.object.isRequired
  32. };
  33.  
  34. export default withStyles(dashboardStyle)(Dashboard);
Advertisement
Add Comment
Please, Sign In to add comment