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

On Safari the keyring backup file opens in a new tab #97

Closed
Im4JAR opened this issue Feb 10, 2015 · 14 comments
Closed

On Safari the keyring backup file opens in a new tab #97

Im4JAR opened this issue Feb 10, 2015 · 14 comments
Assignees

Comments

@Im4JAR
Copy link

Im4JAR commented Feb 10, 2015

No download at all

Safari Version 8.0.3 (10600.3.18)

@let4be let4be added the bug label Feb 12, 2015
@let4be let4be self-assigned this Feb 12, 2015
@let4be
Copy link

let4be commented Feb 13, 2015

related issue from a Filesaver lib we use, eligrey/FileSaver.js#129

@let4be
Copy link

let4be commented Feb 13, 2015

@let4be
Copy link

let4be commented Feb 13, 2015

Unfortunately I can only test from windows and linux, no mac os here

@let4be
Copy link

let4be commented Feb 13, 2015

It seems we can't get this fixed for iOS && Safari + those browsers lack some other features such as providing file names to files generated entirely in browser

I would not like to pass backup file to the server just to allow user to download them cross platform it contains very sensitive information(encrypted with account password tho).

We could probably give user a warning that he should copy/paste this file and save in a good place

@vviikk
Copy link

vviikk commented Feb 14, 2015

this is on @pzduniak side - he needs to set the HTTP header of the file he's sending. otherwise safari will just see it as another text file.

Content-disposition=attachment; filename=some.file.name

or in html5, you can use

<a download="name_of_downloaded_file" href="path/to/the/download/file"> Clicking on this link will force download the file</a>

To force the browser to download the file. note the download attribute.

more info here http://stackoverflow.com/questions/5192917/force-download-through-js-or-query

@let4be
Copy link

let4be commented Feb 14, 2015

o_O @piggyslasher
this is completely client side action

@vviikk
Copy link

vviikk commented Feb 14, 2015

well - then you can use the

<a download="name_of_downloaded_file" href="path/to/the/download/file"> Clicking on this link will force download the file</a>

@let4be
Copy link

let4be commented Feb 14, 2015

we don't have href ;)
we have only data in memory, i.e. in js variable we need to save without intermediate layer(server)

@vviikk
Copy link

vviikk commented Feb 16, 2015

can you point me to the code that does this? i think i might have a solution. needs some trial and error.

@let4be
Copy link

let4be commented Feb 19, 2015

just make a search for saveAs calls

@let4be
Copy link

let4be commented Feb 19, 2015

the easiest place to test is settings, js/AppLavaboom/controllers/ctrlSettingsSecurity.js

@flixi
Copy link

flixi commented Feb 23, 2015

Status?

@vviikk
Copy link

vviikk commented Feb 24, 2015

5e7004a
this was my fix. I haven't made a pull-request yet as I was waiting for some feedback.

the file is downloaded and saved as 'unknown' in safari, with no extension. its the closest thing i got to saving the file. its a known issue and apple doesnt plan to fix it anytime soon. There is one more way using FileSystem api but I need to do more research on this. We can either

  • use a js comment in the displayed JSON for safari users to manually click save as or
  • go with this method and prompt the user that safari users will have a file called 'unknown' in their download folder.

@let4be
Copy link

let4be commented Feb 24, 2015

fixed with 0a7af34

@let4be let4be closed this as completed Feb 24, 2015
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

4 participants