Guest User

Untitled

a guest
Dec 12th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. constructor(props) {
  2. super(props);
  3. this.uppy = new Uppy({
  4. id: 'uppy1',
  5. autoProceed: false,
  6. restrictions: {
  7. allowedFileTypes: FILE_TYPES,
  8. },
  9. allowMultipleUploads: true,
  10. })
  11. // .use(Tus)
  12. .use(AwsS3Multipart, {
  13. serverUrl: API_BASE,
  14. })
  15. .use(GoogleDrive, { serverUrl })
  16. .use(Dropbox, { serverUrl })
  17. .on('file-added', function(file))
  18. .on('upload-error', (file, err) => {})
  19. .on('error', e => {})
  20. .on('upload-success', (file, res, uploadURL) => {
  21. const { handleSubmit, contentID } = this.props;
  22. debugger;
  23. handleSubmit({
  24. id: contentID,
  25. size: res.file.size,
  26. content_type: 'video',
  27. ext: res.file.type,
  28. link: uploadURL,
  29. source: 's3',
  30. });
  31. });
  32. }
Add Comment
Please, Sign In to add comment