-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Abort not working on autoUpload = false OR Who to remove one file from the List? #119
Comments
@LukasOchmann is this the actual code youre using? You should actually be getting an error. If this isnt the actual code, please provide an updated version or codesandbox |
It is an reduces version. My Example was wrong. |
There are a few things going on here:
With all that in mind, I will need to think of a way to make it easy to remove pending batch items. I think modifying the abort methods is the best approach since it will make it a single flow instead of having implementations decide which flow to use based on internal Uploader state. WDYT? I will look into adding this as a feature soon. |
Thank you for your Response and for accepting it as an enhancement, yes line 43 was a mistake, i was in a hurry.... i also prefer an solution wich modifies the abort method. With an extra method for that usecase i had to evaluate the current files state instead of simply aborting it. As an alternativ to exposing the Uploder instance, could the Uplody take a prop "instance" wich takes in an custom Uploder Instance? or maybe an higher order Component |
I wouldnt like to expose the uploader instance unless there's a very strong case for it In any case, Ive a solution I believe will work nicely. Abort will take care of pending uploads and Uploady context will have the clearPending method available. This way you'll be able to cancel individual (pending) uploads or all of them together |
Describe the bug
When autoUpload is false and abort is called the item will not be removed .
Expected behavior
Abort deletes the file from the list OR a remove method is provided.
Versions
"@rpldy/uploady": "^0.8.3",
"@rpldy/upload-drop-zone": "^0.8.3",
"@rpldy/uploader": "^0.8.3",
"@rpldy/sender": "^0.8.0",
"@rpldy/shared": "^0.8.0",
Code
The text was updated successfully, but these errors were encountered: