126 reputation
8
bio website alexforey.com
location United Kingdom
age 16
visits member for 2 years
seen Feb 3 at 16:43

Getting excited and making things since 1997.


Jul
9
comment Why do some downloading files not know their own size?
True. But the original question is not about video streaming. It's not about viewing a video, or streaming audio, it's about downloading a file over HTTP, so all the arguments about video streaming are not relevant.
Jul
9
comment Why do some downloading files not know their own size?
@UwePlonus nope. There is a difference. Video streaming: the video might not have been fully created by the time the user starts downloading it. This is a stream. What you are talking about is on-the-fly creation of files. The file must have finished being created before it is sent to the user. That is how HTTP works. It is easy to find the total size of an on-the-fly document before it is sent to the browser. You can do it in most programming languages. Here's an example in PHP: pastebin.com/acjteP7i
Jul
9
comment Why do some downloading files not know their own size?
We're not streaming PDFs... this question was about downloads.
Jul
9
comment Why do some downloading files not know their own size?
Not true: when generating things on the fly they are either stored in a temp directory (which you can see the size of) or you can just count the length of the content that you are about to send to the user.
Jul
22
comment New files in /var/www have the wrong permissions
Thanks! I'd been banging my head against permissions that seemed to be correct but still wouldn't work. I should have known it would have been in a config file.
Jul
16
comment Reliable Web and MySQL Server Configuration with Limited Hardware
I'm not sure how big the DB will turn out, but there are going to be a fair amount of queries for each page load (checking session tokens), as it's actually a personal web app that I might end opening up to a few friends.
Jul
16
comment Reliable Web and MySQL Server Configuration with Limited Hardware
Oh and why wouldn't you host a database on a Raspberry Pi? Given that it has a flash architecture wouldn't that make it faster than the Linux box that has a HDD?
Jul
16
comment Reliable Web and MySQL Server Configuration with Limited Hardware
I've updated my post for you.