Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addExtraData #24

Open
memcaliber opened this issue Aug 11, 2023 · 1 comment
Open

addExtraData #24

memcaliber opened this issue Aug 11, 2023 · 1 comment

Comments

@memcaliber
Copy link

i have code in react JS:
import {addExtraData } from '@files-ui/react'

how to using addExtraData , i want to send form data with uploading image to server.

@OneHatRepo
Copy link

I was looking for this same functionality.

The addExtraData method is an internal function to the library. What you really want is the "extraUploadData" property of an ExtFile. Add this property in DropZone.onChange and it will be sent to the server.

onDropzoneChange = (files) => {
	_.each(files, (file) => {
		file.extraUploadData = {
			test1: true,
		};
	});
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants