-
-
Notifications
You must be signed in to change notification settings - Fork 237
Delete element from collection during upload #263
Comments
use the filters, you could also use the allow/deny rules. I'm closing this - we are tracking better docs: |
To clarify about pre-upload validation vs. allow/deny:
In general, I would wait until upload is complete or cancel uploading before deleting a file. I don't think we've tested deleting a file while it's uploading. |
How to cancel uploading before deleting the file? |
It should be possible to cancel the upload task and then delete the file? |
@aldeed btw. we could have the task fail permanently if file not found? |
@Chaosbohne, |
@raix Yes, or deleting the file should imply canceling the upload progress if necessary. I came up with the following solution:
|
For now Its not public api... |
I'm having the same problem. Is it possible to cancel an upload when a file is removed from collection? |
@Chaosbohne Does FS.HTTP.uploadQueue.cancel(fileObj); work for you? It doesn't cancel anything for me. |
Any update on this? If I cancel a file upload server crashes. |
hi @bitomule did u find a solution delete during the upload ? |
I don't remember. I was using a fork that allowed multiple server setups and cancel worked better. I'm not doing a lot of meteor now but I won't use CollectionFS again. I'll try to do something smaller using packages for different parts. |
Whats the best practise to delete files of a CollectionFS that are still uploading?
Szenario:
I want to have filevalidation (size,type etc.) if a user picks a file. The validation is set with filters inside my collection. Now i pass this file to the collection with an insert, because i havent found a method that gives me the possibilty to make a simple isValidCheck() without uploading.
Now when a user decides to change the image. I had to delete the older image out of CollectionFS and if the image is still uploading there are some ugly error messages in console. The client still tries to upload while he cant because the file was already deleted.
Is there a method to tell the fileObj that i want to stop upload before deleting the image?
Iam using dev-branch.
Whats best practise?
The text was updated successfully, but these errors were encountered: