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

filesize problem #281

Open
Prince444 opened this issue Jul 24, 2020 · 2 comments
Open

filesize problem #281

Prince444 opened this issue Jul 24, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@Prince444
Copy link

Prince444 commented Jul 24, 2020

v1

file size different from content length.

i need how much space it will fill up on your computer. not content length.

Content size and file size are different.

MaxFileSize function check with content length.

@AnandChowdhary AnandChowdhary self-assigned this Jul 24, 2020
@AnandChowdhary AnandChowdhary added enhancement New feature or request question Further information is requested labels Jul 24, 2020
@AnandChowdhary
Copy link
Member

Thanks for opening this issue, @Prince444.

Quick question: Is it not possible to compute the file size on the server side? For example (Node.js), if you save the file on the disk, you can use fs.stat to find the file size. If you want the size before saving it, you can even use the Buffer length to compute the number of bytes (https://stackoverflow.com/a/46637826/1656944). What language are you using, perhaps I can point to the right docs?

@Prince444
Copy link
Author

Thanks for Reply @AnandChowdhary

i am using asp.net mvc for file save in server.

HttpFileCollection hfc = System.Web.HttpContext.Current.Request.Files;

in this line i get file in hfc variable.


again explaining
actual picture size is 1 MB but content length showing it 1.6 MB


Provide doc for implementing v2 in asp.net mvc Razor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Development

No branches or pull requests

2 participants