Opened on 10/05/2015 at 11:49:18 AM

Closed on 10/26/2015 at 08:39:01 AM

Last modified on 12/01/2015 at 09:42:44 AM

#3160 closed change (fixed)

Allow users to download images to their local photo storage

Reported by: sven Assignee:
Priority: P3 Milestone: Adblock-Browser-for-iOS-1.2.0
Module: Adblock-Browser-for-iOS Keywords: salsita
Cc: jand, pavelz, mario Blocked By:
Blocking: Platform: Adblock Browser for iOS
Ready: yes Confidential: no
Tester: Shikitita Verified working: yes
Review URL(s):

Description (last modified by mario)

Background

There is no option to download images to your local image storage as of now.

There are two use cases where image downloads should be implemented:

  1. Images, that are embedded into websites. (e.g. http://google.com/ - The Google logo)
  2. Images, that are displayed separately (e.g. https://eyeo.com/images/media/abp_icon.jpg)

What to change

For both use cases as described above implement the following changes:

  • Add a new item labelled "Save image" to the context menu that is displayed when a user taps on an image element, as long as the element being pressed is of the supported image types. Implement as in the layout in attachment: "adblock browser iOS 57 press and hold menu 2.png".
    • Display the content of the "alt=" attribute within the <img> tag as the title of the context menu. If there is no alt attribute, display the image name as the title instead.
  • Download the selected file, store it into "Apple Photos" and close the context menu as soon as the user taps on "Save Image" within the context menu. Save the file with the exact file name as provided by the server.

Attachments (1)

adblock browser iOS 57 press and hold menu 2.png (251.8 KB) - added by sven on 10/05/2015 at 11:49:42 AM.

Download all attachments as: .zip

Change History (16)

Changed on 10/05/2015 at 11:49:42 AM by sven

comment:1 Changed on 10/05/2015 at 11:51:13 AM by sven

  • Cc jand added
  • Description modified (diff)

comment:2 Changed on 10/05/2015 at 01:35:32 PM by sven

  • Cc pavelz added

comment:3 Changed on 10/08/2015 at 03:12:41 PM by vojtab

comment:4 Changed on 10/12/2015 at 11:17:50 AM by mario

  • Keywords salsita added

comment:5 Changed on 10/13/2015 at 10:00:06 AM by mario

@vojtab, Is there a mechanism in iOS in order to properly handle/open "known" file types by the corresponding app like proposed in the description? Please let us know if you need more information (e.g. list of file types to handle) in case this is not automatically handled by internal mechanisms.

comment:6 Changed on 10/13/2015 at 11:50:47 AM by pavelz

Short answer is No. I wonder what was meant by the "default iOS apps" sentence, it is unfortunately misleading. As already discussed with Sven: there is no automatic handling. It's up to our code to detect the content type and handle it accordingly. Only images are certainly recognizable. Videos are not 100% certain but still quite safe by response header MIME type. Both mentioned cases have one thing in common: it is storeable right away in an iOS-reserved place. Any other file type can only be stored right in the app and a download manager must be implemented, allowing for listing the downloaded files and offering a selection of actions on it. There is no "Save to" on iOS. A generic file can only be piped to another app (not "stored") or to a web service (ie. cloud storage)

In terms of an implementation effort, image alone is easiest by far, followed by videos - no download mgr needed but requires analysing the response header to detect the content type and file name. Generic file type is the most effort, requires new UI and file storage mgmt.

I believe that the preliminary conclusion was to implement images as the most requested feature, and the rest of types with lesser priority. Making it one common ticket is somewhat unfortunate.

comment:7 Changed on 10/15/2015 at 08:45:03 AM by mario

  • Cc mario added
  • Description modified (diff)
  • Summary changed from As a user i want to save images and known files with known file formats to Allow users to download images to their local photo storage

I have revised the description to only cover image downloads now.

comment:8 Changed on 10/15/2015 at 08:51:19 AM by mario

I've also tried to cover two other use-cases, but other iOS Browsers seem to ignore them:

  • Forced image downloads ("Content-Disposition: attachment" and the like) seem to be ignored and don't trigger a download.
  • Text links to images seem like they also don't trigger the "Save Image" long-press context menu item.

As Safari behaves like this (and as both use-cases would lead to the image URL where the user can subsequently download the image manually), I've decided to ignore them as well. Do you agree?

comment:9 Changed on 10/15/2015 at 10:16:38 AM by mario

  • Description modified (diff)

comment:10 Changed on 10/15/2015 at 12:02:32 PM by mario

  • Description modified (diff)

comment:11 Changed on 10/15/2015 at 02:43:13 PM by mario

  • Description modified (diff)

Added the passage about saving the file with the exact filename as provided by the server. Please let me know if there is any possibility, that the server might not return a proper file name, that I'm not aware of. In that case, I'll extend that addition.

comment:12 Changed on 10/26/2015 at 08:32:58 AM by mario

  • Priority changed from Unknown to P3
  • Ready set

comment:13 Changed on 10/26/2015 at 08:39:01 AM by pavelz

  • Resolution set to fixed
  • Status changed from new to closed

comment:14 Changed on 11/04/2015 at 10:34:35 AM by mario

  • Milestone set to Adblock-Browser-for-iOS-next

comment:15 Changed on 12/01/2015 at 09:42:44 AM by Shikitita

  • Tester changed from Unknown to Shikitita
  • Verified working set

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.