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

Provide a mechanism for removal of temporary data for aborted uploads #113

Open
brucejo75 opened this issue May 16, 2016 · 4 comments
Open

Comments

@brucejo75
Copy link

I think that bug #7 against the sample may be a file-collection bug.

@brucejo75 brucejo75 changed the title Sample app does not delete aborted file Sample app does not delete large aborted file May 16, 2016
@vsivsi
Copy link
Owner

vsivsi commented May 16, 2016

Hi see my comments over there, the behavior you describe is expected w.r.t. file-collection. It is the sample app that is producing what you are observing.

@brucejo75
Copy link
Author

Hi, what do you think of adding an options argument to fc.remove?

something like:

fc.remove(file, undefined, { removeIncompleteData: true })

Then fc.remove could take out the main file link and all chunks from the incomplete file.
I appended the options to be backward compatible...

I would jump on this and send you a pull request, but I do not understand coffee and I have not built a package yet. I forked the project, but it looks like there are no build scripts included in meteor-file-collection?

@vsivsi
Copy link
Owner

vsivsi commented May 18, 2016

FYI, this general issue (incomplete uploads) has come up before: #77

Having a day to think about this, I think that fc.remove() should always clean-up any associated temporary files. There is no practical way to "resume" uploading to a deleted file, so this should be the default behavior (no special option required).

However, implementing it elegantly may be tricky because the server-side resumable.js support is about 98% separate from file-collection, and the goal going forward is to make that 100% so that it is easy to plug-in support for other chunked uploading solutions. See for example:

#107
#102

Anyway, this is a problem that any such upload backend will need to handle, so I just need to come up with a standard mechanism to trigger the cleanup.

@vsivsi vsivsi reopened this May 18, 2016
@vsivsi vsivsi changed the title Sample app does not delete large aborted file Provide a mechanism for removal of temporary data for aborted uploads May 18, 2016
@brucejo75
Copy link
Author

thanks for the heads up. I followed your advice for the observe on my JSSample app and it works like a charm. I look forward to the enhancement.

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

No branches or pull requests

2 participants