Pomf
Pomf copied to clipboard
Display file size in API
As a pomf API programmer, I need some way to manage the maximum file size for certain host. It would be great if there was a page (/maxsize.php) which would show maximum size in bytes.
https://github.com/nokonoko/Pomf#configuring
The "real" max upload size is left up to the person who configured the webserver to set it, so it would be pretty difficult to create a file that gets the current webserver configuration, as depending on which OS and software you run it on, there are many many places to find a webserver configuration file and many many ways you have to read them.
Otherwise, if you want to trust whatever the Gruntfile says, you can have Grunt create a simple file called /max_size
that contains the plaintext number of whatever the max upload size is.
It would be nice if it would be converted to bytes for API tools. It is still better than lack of such way to check max file size.
It's hard to introduce any changes to the pomf API now that there are all the clones around. Many of them don't get updated from almost a year. Sure, making it so that there's a "convention" for which there is a page where you can programmatically retrieve the byte size is still better than having nothing, but it probably won't work for 99% of all alive pomf clones.
On 05/03/16 23:15, Mikolaj Halber wrote:
As a pomf API programmer, I need some way to manage the maximum file size for certain host. It would be great if there was a page (/maxsize.php) which would show maximum size in bytes.
— Reply to this email directly or view it on GitHub https://github.com/nokonoko/Pomf/issues/46.
So, for now I'll probably just do it with good old host_list, maybe some day all clone owners will sit on #pomfret
channel.
how do e.g. browsers get file size of files before downloading them, then?
@avail The Content-Length
header. It's completely optional, and can be omitted if the web server is configured to.
@SEAPUNK why would @lich not just utilize that header, then? Most pomf clones I've seen send the header.
I believe lich wanta to know the max size of files you can upload, rather than the filesize of the files you download.
On 7 March 2016 18:13:56 CET, 0x617661696c [email protected] wrote:
@SEAPUNK why would @lich not just utilize that header, then? Most pomf clones I've seen send the header.
Reply to this email directly or view it on GitHub: https://github.com/nokonoko/Pomf/issues/46#issuecomment-193352467
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Oh my bad, I haven't read the post fully (was initially reading whilst on phone)
This will not be implemented in pantsu/pomf
as far as I can say as the co-maintainer. It would be idiotic to add more code to do something that is much like robots.txt
, growing the size and complexity of the code. No thank you.
The v2 API is much more important for me for the eventual 3.0 branch.
So, for now I'll probably just do it with good old host_list, maybe some day all clone owners will sit on #pomfret channel.
That will not happen until Rizon allows connections from Tor or someone creates a mailing list for Pomf development and discussion. I'm banned on Rizon for operating a Tor exit from my home.