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

Auto delete file from directory? #2

Closed
SPAHI4 opened this issue Mar 22, 2017 · 5 comments
Closed

Auto delete file from directory? #2

SPAHI4 opened this issue Mar 22, 2017 · 5 comments

Comments

@SPAHI4
Copy link

SPAHI4 commented Mar 22, 2017

I think if there was an error thrown later in the resolver (or other middleware), the uploaded files should be deleted (optionally).

@jaydenseric
Copy link
Owner

Can you think of any sorts of errors where you would not want them deleted?

@SPAHI4
Copy link
Author

SPAHI4 commented Mar 22, 2017

I have no idea. Anyway, it can be disabled.

@jaydenseric
Copy link
Owner

Do you mean if there is an error within the apollo-upload-server middleware, or anywhere in following app middlewares too? The first would be easier and less risky.

I would hesitate to delete the upload once our middleware has done it's job and passed the details into the resolver. Any errors from that point on would be due to the application code and should be caught and handled by the application developer.

@SPAHI4
Copy link
Author

SPAHI4 commented Mar 22, 2017

I mean the second.
The error may be thrown somewhere between the apollo-upload-server and the actual resolver

@jaydenseric
Copy link
Owner

Closing this in favour of #13.

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