none
How to create downloadable content (digital certificate) RRS feed

  • Question

  • I need to create a link with a downloadable certificate from javascript, like in this example: 

    <html>
    <body>
    <a href="data:application/octet-stream;base64,MIIGHgIBAzCCBeQGCSqGSIb3DQEHAaCCBdUEggXRMIIFzTCCAt0GCSqGSIb3DQEHAaCCAs4EggLKMIICxjCCAsIGCyqGSIb3DQEMCgEDoIICcTCCAm0GCiqGSIb3DQEJFgGgggJdBIICWTCCAlUwggG+oAMCAQICAQEwDQYJKoZIhvcNAQEFBQAwEzERMA8GA1UEAxMISm9obiBEb2UwHhcNMTUwNzIyMDgyMjI4WhcNMTYwNzIyMDgyMjI4WjATMREwDwYDVQQDEwhKb2huIERvZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtOuuKOomGssCdzIIgu09P6fox8bpgeSmLpZwBSnwRrzEHBM+hdXZHk+mNKb6mWLjAe/hK+DgywfG/IML7oBWjpsjO7Y0teoGl1n58wovKVHhtxrMcK92WYFmDqw/D3ExX0u47CeYqsPRqtwJaRvxxqyL333y+/c9IZrEjTHB8J0CAwEAAaOBuDCBtTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIC9DA7BgNVHSUENDAyBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDBggrBgEFBQcDBAYIKwYBBQUHAwgwEQYJYIZIAYb4QgEBBAQDAgD3MCwGA1UdEQQlMCOGG2h0dHA6Ly9leGFtcGxlLm9yZy93ZWJpZCNtZYcEfwAAATAdBgNVHQ4EFgQUXsUXmo8Kutlh8NFdPR6SbTKc5DgwDQYJKoZIhvcNAQEFBQADgYEAfRHi42Q0Y9Rbmg2U49iIKRCSEjNXkgIDkE+nanOMdhbpZWJk/ICgNtuL2225TFaQNMGEOZ17xHBPhrfhvkNwH+EznYkxxYmrkxbfRxNqAXb2LgBieQaVgIo8rudOYJlrllQG4IATXab6w942csjDjpyAnmj6F+0W5Wx8e8GqGoQxPjAjBgkqhkiG9w0BCRUxFgQUqA8C8fC1+p8mff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QZ1Qwymh1sJM5jqEECGUqN3h1vdV3AgIIAA==" download="test.p12">Download Certificate</a>
    </html>
    </html>

    The problem is that when I click the link in IE, either the browser just hangs and nothing happens or, if I put that in a local html file, I'm prompted to select an application to open that kind of file.

    Also Microsoft Edge is working in the same way.

    How can I create a link with data that IE and Edge will just download?



    Paolo Tedesco - http://cern.ch/idm


    Wednesday, July 22, 2015 8:30 AM

Answers

All replies