-
-
Notifications
You must be signed in to change notification settings - Fork 16
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 limit #27
Comments
As far as I can tell, the only way to determine file size without actually downloading the file itself with w GET is to use a HEAD request, and see if the filesize header is included. In preliminary (but potentially flawed) testing with the above method, HEAD requests do not contain file size data. I will test further, but it appears that this will not work. |
Turns out I'm just dumb haha I can call contentLength() on the Response, and that will return to me the size of the Response's body (image) in bytes. Now I need to figure out how to integrate it into the current artwork filtering and getting flow:
|
On further inspection getArtworkRanking() needs the chosen artwork after filtering to grab variables to pass to Muzei (token, attribution). I could package the relevant data in a struct / class (the response, and relevant artwork details), but I want to avoid doing it this way if possible |
I can have the loop that normally runs in filterArtworkRanking() be run in getArtworkRanking() |
On inspection, while most downloaded images are under 1MB, a number of the imagesbeing downloaded are quite large; from 6 MBs up to 17MB.
Should be trivial if file size can be determined from Response body
The text was updated successfully, but these errors were encountered: