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

Unexpected behaviour when file uploading process takes more than 1 seconds #20

Open
mehimanshupatil opened this issue Sep 29, 2021 · 3 comments

Comments

@mehimanshupatil
Copy link

Refer to #1

I update poster url after uploading the image, but some unexpected behaviour is occurring.
When the file is uploaded in less than a second the poster is updated and the status becomes completed which is expected behaviour.
when the process takes more than a second, then the poster is updated but the delete call is made and status becomes idle, but after clicking upload button it works as expected

codesandbox reproduced example
change timeout to 2000 or more ms

@rikschennink
Copy link
Collaborator

Updating metadata in the process method isn't supported. You should process the image in there not adjust the file item.

You can update the file item post property in other callbacks, for example in onprocessfile.

@mehimanshupatil
Copy link
Author

@rikschennink thanks for quick reply.
I have removed metadata update function from process method, and have added the same in onprocessfile callback.
but the issue still persist. I have updated above example

@mehimanshupatil
Copy link
Author

passing silence param to setMetadata("poster", "url", true ) makes code work.

should update docs as per.

dont know how it affects internal functionality.

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