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

UploadDirectoryAsync - delete local file after upload #165

Closed
hashitha opened this issue Feb 23, 2015 · 6 comments
Closed

UploadDirectoryAsync - delete local file after upload #165

hashitha opened this issue Feb 23, 2015 · 6 comments
Labels
feature-request A feature should be added or improved.

Comments

@hashitha
Copy link

Feature request to delete file after upload

@normj
Copy link
Member

normj commented Feb 23, 2015

I'm leery of the SDK being in charge of deleting local files when it seems like a simple thing for the client application to take care of when it knows for sure when to delete the files. Can you give a better reason why you would want that logic in UploadDirectoryAsync?

@hashitha
Copy link
Author

The only reason I asked for this is because I can't seem to find a way to detect which files were uploaded and which ones failed. for e.g. when the internet drops after a few files have uploaded.

@PavelSafronov PavelSafronov added the feature-request A feature should be added or improved. label Feb 26, 2015
@PavelSafronov
Copy link

At the moment, there is no simple way to detect when the SDK has uploaded a particular item in a directory, but we are thinking of adding a progress callback that would be called when a file has been successfully uploaded to S3. That should allow you to delete the files.

@hashitha
Copy link
Author

Thanks that would be great if you can please add this to uploadFileRequest as well. I tried deleting the file at the progress by checking if sent bytes == total bytes but it looks like the file is still open at this stage so i get error file open by other application.

@PavelSafronov
Copy link

Glad to hear that this approach will work for your case.
For uploading an individual file, you should be able to delete the file once the upload method returns.

@jimfl
Copy link
Contributor

jimfl commented Oct 23, 2015

@jimfl jimfl closed this as completed Oct 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

4 participants