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

download of image (generic file?) fails if identical filename present locally (OTF filenames) #41284

Open
2 of 5 tasks
labor4 opened this issue Sep 28, 2024 · 0 comments
Open
2 of 5 tasks
Labels
bug needs-investigation A bug not 100% confirmed/fixed OS/iOS Fixes related to iOS browser functionality

Comments

@labor4
Copy link

labor4 commented Sep 28, 2024

Description

Browsers support the download of files whose filenames are defined in the download attribute of the link, and whose source filenames are supposed to be discarded in favour of that attribute content..

This fails when [filename already present locally] on Brave iOS, but not Safari iOS.
This succeeds when [no such filename conflict present locally]

The download itself is being done, but is shown as failed after completion.

In the reconstruction example I used a download initialized by js.

Steps to reproduce

I did not test against non-OTF (normal) filenames

I think the minimum definition is:

If: [supposed filename is handled on-the-fly, so is not original source/link filename]
then: [Auto-Rename mechanism is not triggered]

The following js download trigger code would currently fail,
if fileName is already present in IOS download dir:

   var link = document.createElement('a');
   link.href = fileUrl;
   link.download = fileName;
   document.body.appendChild(link);
   link.click();
   document.body.removeChild(link);

Actual result

  • download finishes
  • error "download failed"

Expected result

  • download finishes
  • renamed if needed (ie: image-1.png, image-2.png)

Reproduces how often

Easily reproduced

Brave version

1.69.2 (172)

Device/iOS version

17.6.1
iPhone Xs

Affected browser versions

  • latest AppStore
  • latest TestFlight
  • previous TestFlight

Reproducibility

  • with Brave Shields disabled
  • in the latest version of mobile Safari

Miscellaneous information

not an issue in iOS Safari

@labor4 labor4 added the OS/iOS Fixes related to iOS browser functionality label Sep 28, 2024
@bsclifton bsclifton added bug needs-investigation A bug not 100% confirmed/fixed labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-investigation A bug not 100% confirmed/fixed OS/iOS Fixes related to iOS browser functionality
Projects
None yet
Development

No branches or pull requests

2 participants