Add a comment. Active Oldest Votes. Improve this answer. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.
The Overflow Blog. Podcast what if you could invest in your favorite developer? Unknown file size while downloading attachment. However the file size can be seen in issues attachment ares, but while download it doesn't shows the file size I had attached which shows the exact concept, please check on it Following are the details of my Redmine deployed environment: Environment: Redmine version 2.
Regards, Amit. Cast the value to a string. Please let me know any other solution. Attaching the proof of error. Cheers, Amit Baswa. Now I could see the file size while downloading it. Please find attachment for reference. Response is appreciated. Cheers, Amit. Cheers, Amit Hi, Can you please let me know if above issue will track in this issue or should I open a new ticket for this?
Now I am getting corrupted files, since the archive is about 30kb larger then my content-length header. This is not possible by design. If this was possible, then the zip headers also wouldn't need the streamed flag. The file either has to be created on disk and then downloaded Content-Length known or it can be streamed Content-Length not known.
Sorry for replying to this so late, but I'm finally working on my project that uses this. Turns out there is a way to calculate the overhead, after reading this post which appears to be wrong in this case and some trial and error it seems to be:. Adding that to the actual size of the files in the archive, I've been able to use this on roughly 40 different ZIPs of widely varying sizes without issue, and multiple browsers are able to download the file with progress bars, as well as extract the resulting file successfully.
More testing is probably needed though. Whether you want to implement this in ZipStream or not I don't know, but just thought I'd let anyone else that came across this know that it is possible.
I've tried the above calculation, but it did not work using the latest v2 version of this library. I did play around with available variables and the following calculation gives me the correct size for every download I've tested so far:. I am not sure why the magic number increased from 76 to without looking at the actual ZIP code, but I might use this for production soon the UX improvement is great, having the progress bar.
Mine is still working, now in production, on everything I've thrown at it. It could be OS or Filesystem or maybe even character encoding dependent. Don't know enough about it, honestly. I am using ZipStream v2. That's why I am sending the Content-Length header the specified filesize is correct. Yet, all browsers I tested this is are telling me the filesize is unknown which might lead to the user skipping the download.
Is this some kind of problem with my header information? Is it a client-side problem? Should I use another approach to getting the client to download the file?
More info here. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Download file size is unknown although file size is present in header Ask Question.
0コメント