ActivePresenter Saola Animate Pricing Download

Problems downloading file inside scorm

good morning, i have a problem downloading a .hex file inside a scorm.

The problem is that when downloading the file when pressing a button
(using a java:
var a = document.createElement(“a”);
a.href = “resources/EA06_Programa_o_erro_no_sensor_N3.hex”;
a.download = “EA06_Programa_o_erro_no_sensor_N3.hex”;
a.click();
)

the downloaded file contains an html instead of the original (.hex)

I enclose an example project with what happens to me.

What would i be doing wrong in java?
a greeting

Description of the example project

  • Button 1: link in the text to the resource: It works but we don’t want to put a link in the texts

  • Button 2: link to the resource by opening it in the browser: It works but it is not good for us, because we must download it

  • Button 3: download the file but convert it to another format and it does not work for us

project example - file download error.approj (3.1 MB)

Hi Lorena,

a.href should be the URL of the resource after exporting to HTML5.
It’s “resources/res_10002.hex” in this case.

var a = document.createElement("a");
a.href = "resources/res_10002.hex";
a.download = "EA06_Programa_o_erro_no_sensor_N3.hex";
a.click();

Regards

thank you very much again. everything worked correctly :hugs:, greetings