Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private handleAddFiles = (files: any) => {
- const filesData = files.forEach(({ name, size, type, uuid }) => ({ name, size, type, uuid }));
- files.forEach(file => {
- const uuid = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/g.exec(file.preview)[0];
- file['uuid'] = uuid;
- });
- this.setState({
- files: this.state.files.concat(files),
- filesData: this.state.files.concat(filesData)
- })
- console.log(this.state.filesData); //undefined
- }
Add Comment
Please, Sign In to add comment