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

UploadFile stuck in while-loop #46

Closed
FiddlerKing opened this issue Feb 6, 2017 · 10 comments
Closed

UploadFile stuck in while-loop #46

FiddlerKing opened this issue Feb 6, 2017 · 10 comments

Comments

@FiddlerKing
Copy link

When using UploadFile (stream, "path"); to a filename that already exists and the uploaded file is smaller than the existing one. Then UploadFileInternal gets stuck in the empty while-loop, since upStream.Length is bigger than upStream.Position.

@robinrodricks
Copy link
Owner

Thanks for reporting this. We'll work on a fix as soon as possible. For now best way is to DeleteFile() and the UploadFile()

@daveaglick
Copy link

I can confirm the same problem. Deleting before uploading seems to resolve the issue for me.

@stefanouic
Copy link

I can confirm the same problem.
I've tried the following versions: 16.2.0 and 16.2.1.
Now, instead of upload with overwrite I'm doing a delete upload (with no overwrite).

@robinrodricks
Copy link
Owner

robinrodricks commented Feb 22, 2017

@Fjomp08 @stefanouic
I've implemented a fix for this in 16.2.3. Can you guys check and see if it works? I'm internally checking for the file existence before every upload, and deleting the file if it exists before uploading. I had earlier assumed that using OpenWrite would guarantee that the remote file is overwritten, but since all of you have problems with that I had to implement such a fix.

@daveaglick - Can you try uploading without DeleteFile() and see if all goes ok?

https://www.nuget.org/packages/FluentFTP/16.2.3

@daveaglick
Copy link

I'm still having trouble with this in 16.2.4. When I attempt to UploadFile() without first doing a FileExists() followed by a DeleteFile(), I get timeouts similar to #55.

@robinrodricks
Copy link
Owner

@daveaglick - Thats very strange. Because I'm simply doing a FileExists() check internally then DeleteFile() if the file exists. No other code has been added/changed.

@przemekwa
Copy link

I having this trouble with 16.3.0.0 ( filename that already exists and the uploaded file is smaller than the existing one. )

Can You fix this, I need Your dll on production site?

@robinrodricks
Copy link
Owner

@przemekwa - Can you ensure that checkFileExistance is true? If its true there should be no problem...

@przemekwa
Copy link

OK, I have false

client.UploadFile(fs, txtFilePath, true, true, false);

OK, I will check and I will back to you with feedback.

Thx.

@robinrodricks
Copy link
Owner

I'm closing this. If you are still having this issue then add a comment and I'll reopen it.

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

5 participants