plugins.file.writefile and HTTPS

I am running a web client on a secure site (HTTPS). I have a button on a form that calls

plugins.file.writefile("myFile", documentBytes);

Unfortunately, the file does not download in the browser and I get a message in the browser console:

Safari:

[blocked] The page at about:blank was not allowed to display insecure content from http://mywebsite.com/live/servoy-webclient/resources/servoy/resources.

Chrome:

Mixed Content: The page at 'https://mywebsite.com/live/servoy-webclient/?x=kRCSH0O-3Eypw2v6gAV3bg' was loaded over HTTPS, but requested an insecure resource 'http://mywebsite.com/live/servoy-webclient/resources/servoy/resources'. This request has been blocked; the content must be served over HTTPS.

Any idea how I get the file to be served over HTTPS?