Bug 275288 - Installed PWA not downloading pictures
Summary: Installed PWA not downloading pictures
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Safari 17
Hardware: iPhone / iPad iOS 17
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-06-07 19:31 PDT by Laszlo
Modified: 2024-07-08 00:51 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo 2024-06-07 19:31:03 PDT
When visiting a PWA from Safari mobile and downloading a picture, the download prompt appears and asks the user to download, upon clicking it will save the file to downloads folder.

If you add/install the PWA to the Home screen, the download no longer works at all and shows no indication of a download. 

Android with Chrome behaviour appears to be similar to the non-installed PWA in iOS/Safari for these downloads.

Here is the example JS/TS used for the reproduction (blob is already a smaller/compressed picture)
const url = URL.createObjectURL(blob);
    const link = document.createElement('a');
    link.href = url;
    link.download = fileName;
    document.body.appendChild(link);
    link.click();
    document.body.removeChild(link);
    URL.revokeObjectURL(url);
Comment 1 Alexey Proskuryakov 2024-06-10 13:24:38 PDT
Thank you for the report! Would it be possible for you to share a URL to test with?
Comment 2 Laszlo 2024-06-10 14:22:06 PDT
(In reply to Alexey Proskuryakov from comment #1)
> Thank you for the report! Would it be possible for you to share a URL to
> test with?

Here you are https://github.com/Operandi/webkitBug275288

If you use Safari on iOS, the download popup occurs and allows you to click OK to download the file automatically. If you install the PWA on the homescreen, the popup is a preview of the file instead and the user has to click to save the file within the link.
Comment 3 Radar WebKit Bug Importer 2024-06-13 12:35:52 PDT
<rdar://problem/129787577>
Comment 4 Karl Dubost 2024-06-24 19:40:55 PDT
@Laszlo As currently shown, it (after discussions) seems the UI difference in betweem iOS and macOS is expected here. 

Thanks a lot for reporting. 
It doesn't depend on WebKit, so I will close it here.
The radar will be addressed by the right team inside Apple.
Comment 5 leon.wolf 2024-07-07 22:34:38 PDT
(In reply to Karl Dubost from comment #4)
> @Laszlo As currently shown, it (after discussions) seems the UI difference
> in betweem iOS and macOS is expected here. 
> 
> Thanks a lot for reporting. 
> It doesn't depend on WebKit, so I will close it here.
> The radar will be addressed by the right team inside Apple.

Is there a way to keep track of the moved bug? We have an issue depending on that and would like to follow along the progress.
Comment 6 Karl Dubost 2024-07-08 00:51:28 PDT
As it belongs to the Safari UI (and not the opensource WebKit part), it's not possible. Sorry about that.