Paste 4x2uk Plain Text
03:25:27 n-tech @ __uguu__ the problem with that is I do not want to the store files by name. [...] 04:06:28 __uguu__ n-tech: they aren't 04:06:53 n-tech yeah I reviewed your work, there's a few things to work out, like 04:06:57 n-tech we can't reserve the name /upload/ 04:07:04 n-tech is that a root directory or are you handling /x/upload 04:07:43 __uguu__ change the prefix to be https://media.8ch.net/upload/ instead of /upload/ 04:08:17 __uguu__ when accessing uploads you want to not touch any php at all 04:08:27 __uguu__ even what i have right now is really iffy 04:08:37 n-tech XenForo uses PHP for uploads and it works fine. 04:08:46 n-tech But help me understand how this works real quick 04:08:50 __uguu__ uh... serving files via php is a big no no 04:08:54 n-tech The currently request pattern is /board/file/md5/request.name 04:08:56 __uguu__ files like images 04:09:06 n-tech how does this work now 04:09:08 __uguu__ it won't scale 04:09:38 __uguu__ right now i have /board/file/md5.ext 302 to $prefix/md5.ext 04:09:51 __uguu__ and $prefix is set to /upload/ right now 04:09:53 n-tech is the download named after the md5? 04:10:00 __uguu__ yes 04:10:23 n-tech Would it be possible to retain the request name? 04:10:41 __uguu__ http://$site/test/file/50a926e404884ecb5e2208b432b0d8cd/phpvtMTrt.jpeg 04:11:00 __uguu__ that redirects to http://$site/upload/50a926e404884ecb5e2208b432b0d8cd.jpeg 04:11:50 __uguu__ and it can be changed to be subdomain.site.tld/upload/md5.ext or event subdomain.site.tld/md5.ext 04:12:01 __uguu__ but it's hard coded now 04:12:33 __uguu__ serving files via php is horrible and won't scale up 04:12:52 __uguu__ it's the same problem livechan had and it's parially why it was rewriten in go 04:13:16 __uguu__ you want to have everything use static files as much as you possibly can 04:13:27 __uguu__ even what you have now is a bit too much dynamic content 04:13:36 n-tech no it's not. 04:13:41 __uguu__ no seriously it is 04:13:43 n-tech we're not going back to static files for everything 04:13:55 n-tech we can leverage a proper caching system 04:14:00 __uguu__ you won't scale to handle the traffic levels of 8chan 04:14:10 __uguu__ i have been working on the caching part 04:14:14 n-tech I disagree considering major suites absolutely do already 04:14:16 __uguu__ i am unsure if it will work 04:14:21 n-tech don't go off and do random things dude 04:14:29 n-tech i have no idea what you're working on and that's scary 04:14:30 __uguu__ lol 04:14:31 n-tech because if I have to reject something 04:14:40 n-tech because you just randomly decided to rewrite major parts of the code 04:14:46 n-tech to use something I don't like and we didn't talk about prior 04:14:52 n-tech then it's going to be shitty between us 04:14:55 n-tech and that's pretty fucking gay 04:14:57 __uguu__ don't take it personal man 04:15:06 __uguu__ it's a factual thing, this won't scale as it is 04:15:10 n-tech I'm just telling you I'm not going to accept every PR 04:15:14 __uguu__ i know 04:15:18 n-tech If you want to contribute something I have to actually understand what yo're doing and why 04:15:25 n-tech you neglected to make an issue for your first pr 04:15:33 __uguu__ lol picky much? 04:15:50 __uguu__ n-tech: you need to relax [...] 04:20:48 __uguu__ okay 04:20:58 __uguu__ i yield the time to you to explain 04:22:19 __uguu__ (on the off topic, the stuff in my develop branch is for just me, i only ever offer master for pr) 04:25:06 n-tech http://i.imgur.com/xBOTz8Y.png 04:25:14 n-tech Is this possible? 04:26:47 __uguu__ i'm unsure what it's trying to do, can you elaborate here? 04:27:27 n-tech The request URL is handled the same by nginx, apache, and php. The goal is to handle the request earlier with the web software and distribute the file under a friendly name before php looks at it, if possible. 04:27:56 n-tech So no matter what the environment is you get the same result 04:28:31 __uguu__ i see, how would it work with nginx vs apache? 04:28:42 __uguu__ symlinks? 04:29:18 n-tech With Apache you could probably use the rewrite engine. I'm not as familiar with nginx 04:29:59 __uguu__ if you serve these as static files how do you differentiate between webm and jpg? 04:30:28 n-tech oh bummer, that is a problem. 04:30:35 __uguu__ yes it is 04:30:40 __uguu__ that's the problem that i hit 04:30:48 n-tech I guess you do need the content type to be set no matter what handles the request 04:31:01 __uguu__ or you give the files an extension 04:31:26 __uguu__ then the httpd automagics the content type 04:31:41 __uguu__ (and that's my patch)