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

Download file size error #674

Open
mvsanhueza opened this issue Apr 1, 2024 · 2 comments
Open

Download file size error #674

mvsanhueza opened this issue Apr 1, 2024 · 2 comments

Comments

@mvsanhueza
Copy link

mvsanhueza commented Apr 1, 2024

Dear,

I am using the library to perform automatic updates to a software coming from an ftp link and .msi file. I have the problem that the window showing the download status shows a file size of -1 B. Is there any way to fix this?

Error Size

@ravibpatel
Copy link
Owner

This can happen if the server is not sending the Content-Length header. It uses it to determine size of the file.

@mvsanhueza
Copy link
Author

I understand the issue. However, since the link is of type FTP, I encounter this problem with the server where I have the document. When performing a request download in C# (according to the following link: FTPWebResponse.ContentLength), the content length returned to me is -1. However, if I perform a request beforehand using the GetFileSize method (WebRequestMethods.Ftp.GetFileSize), it correctly returns the ContentLength. I'm not an expert in this field, but at least where the FTP-linked server is hosted, I need to generate two requests: one to obtain the ContentLength and another to download the file.

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

No branches or pull requests

2 participants