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

Display file size in API #46

Open
ghost opened this issue Mar 5, 2016 · 10 comments
Open

Display file size in API #46

ghost opened this issue Mar 5, 2016 · 10 comments

Comments

@ghost
Copy link

ghost commented Mar 5, 2016

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.

@SEAPUNK
Copy link

SEAPUNK commented Mar 5, 2016

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.

@ghost
Copy link
Author

ghost commented Mar 5, 2016

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.

@thehowl
Copy link

thehowl commented Mar 5, 2016

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
#46.

@ghost
Copy link
Author

ghost commented Mar 5, 2016

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.

@avail
Copy link

avail commented Mar 6, 2016

how do e.g. browsers get file size of files before downloading them, then?

@SEAPUNK
Copy link

SEAPUNK commented Mar 6, 2016

@avail The Content-Length header. It's completely optional, and can be omitted if the web server is configured to.

@avail
Copy link

avail commented Mar 7, 2016

@SEAPUNK why would @lich not just utilize that header, then? Most pomf clones I've seen send the header.

@thehowl
Copy link

thehowl commented Mar 7, 2016

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:
#46 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@avail
Copy link

avail commented Mar 7, 2016

Oh my bad, I haven't read the post fully (was initially reading whilst on phone)

@ghost
Copy link
Author

ghost commented Mar 15, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@avail @SEAPUNK @thehowl and others