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

[Chrome] Image download fails with "Failed - Blocked" with no-large-media enabled with small max size #2813

Closed
rctdude2 opened this issue Jul 22, 2017 · 2 comments

Comments

@rctdude2
Copy link

rctdude2 commented Jul 22, 2017

Describe the issue

When no-large-media is enabled, attempting to download an image with a filesize greater then the max size specified in uBlock fails with a "Failed - Blocked" error. uBlock DOES NOT block the image when accessed directly, only if you attempt to download it.
This only appears to happen in Chrome, as I don't recall this happening in Firefox.

One or more specific URLs where the issue occurs

Any image with a filesize greater than the max size works.
Example: https://konachan.net/post/show/232141/

Steps for anyone to reproduce the issue

For the example image above:

  1. Enable blocking large media elements with a small max size (e.g. 2048, but anything works as long as it's less than 7MB).
  2. Go to link above, see that the preview image loads fine. (Note: clicking on "View larger version" on the message at the top will work as it loads the smaller JPG file, not the larger PNG file).
  3. In the sidebar, under options, click "Download PNG"; see that full size image loads fine when accessed directly.
  4. Attempt to save image. Download fails with "Failed - Blocked" error. Disabling uBlock/no-large-media fixes issue.

Your settings

  • Notably, no-large-media enabled with max size set to 2048kb
  • OS/version: Windows 7
  • Browser/version: Chrome 59.0.3071.115
  • uBlock Origin version: 1.13.8
Your filter lists

Everything but experimental, unbreak, AAK, EasyList w/o elem, uBlock protector, merged ultimate, and regionals.

@gorhill
Copy link
Owner

gorhill commented Jul 22, 2017

Sorry, misread the whole thing.

At step 3 the image loads fine because the browser is downloading the image as a "document" (in its own tab).

At step 4, the download fails because the browser is downloading the image as an "image". Also, there is no way for uBO to know that the image was downloaded as a result of "Save as".

Solution: right-click over the page, and select "Temporarily allow large media elements" before downloading the image.

@gorhill
Copy link
Owner

gorhill commented Jul 22, 2017

I am investigating what could be done (if possible at all) at step 4 to prevent the large-media-elements blocking code from interfering when the document in the current tab is itself a media element.

gorhill added a commit that referenced this issue Mar 26, 2024
gorhill added a commit that referenced this issue Mar 26, 2024
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

2 participants