Index of Velo Examples

Hey @kimkin ,
You can use Wix Location to force a download. You can also specify a filename for the downloaded document. Whether the “Save as” dialog box opens depends on your visitors’ browser settings for downloads.

  1. Copy the document’s URL from My Uploads.

  2. Add an onClick event handler to your button in the Properties panel.

  3. Add the following code:

import wixLocation from 'wix-location';

export function button1_click(event) {       
    wixLocation.to("MyCopiedDocumentURL?dn=MyChosenFileName");
}