Wix Forum Logo
  • Community Forum

  • Support

  • Members

  • Groups List

  • Blog

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    Eric Muldrow
    Feb 09, 2021

    Download a Document and Hide WixStatic URL

    in Forum Discussions

    Hello,


    I found some code from the Queen about the mentioned above, I have a question on one line of code that I believe is obsolete as it was written over 2 years ago. I believe the path is different now wondering if anyone knows how to find the current path or know what it is?


    //This one is for Repeater Download with Name from Wix Dashboard Media Manager

    //export function downloadB_click(event, $w) {

        l//et repeaterData = $w("#repeater2").data;

        //let $repeaterData = $w.at(event.context);

        //let source = $repeaterData("#linkB").link;

        //let name = source.split("/")[4];

        //let url = source.split("/")[3];

        

    Below is the code that I'd like to know what is the current path.

    wixLocation.to(`https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);

    }

    0 comments
    Comments

    Share Your ThoughtsSign up to leave a comment.

    0 comments
    Similar Posts
    • Changing Category URL and Post URL
    • Hide identity in url for data protection?
    • hide Views And hide Likes

    WIX FORUM

    Create an online community right on your site with Wix Forum. Your visitors can become members, join conversations, follow posts, leave comments and more. Plus, you can choose from beautiful layouts and customize to get the look you love. And it’s completely free! 

     

    © 2006 - 2020 Wix.com, Inc 

    COMPANY

    About Wix

    Terms of Use

    Privacy Policy

    SUPPORT

    Help Center

    Contact Us

    ​

    • Black Facebook Icon
    • Black Twitter Icon
    • Black YouTube Icon
    • Black Pinterest Icon
    • Black Instagram Icon
    • Black LinkedIn Icon