Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constructor(props) {
- super(props);
- this.uppy = new Uppy({
- id: 'uppy1',
- autoProceed: false,
- restrictions: {
- allowedFileTypes: FILE_TYPES,
- },
- allowMultipleUploads: true,
- })
- // .use(Tus)
- .use(AwsS3Multipart, {
- serverUrl: API_BASE,
- })
- .use(GoogleDrive, { serverUrl })
- .use(Dropbox, { serverUrl })
- .on('file-added', function(file))
- .on('upload-error', (file, err) => {})
- .on('error', e => {})
- .on('upload-success', (file, res, uploadURL) => {
- const { handleSubmit, contentID } = this.props;
- debugger;
- handleSubmit({
- id: contentID,
- size: res.file.size,
- content_type: 'video',
- ext: res.file.type,
- link: uploadURL,
- source: 's3',
- });
- });
- }
Add Comment
Please, Sign In to add comment