Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Is it possible to get the path to an uploaded file with the File Manager?

  • #10095
    Avatar photo[anonymous]

    Hello Publii developers!

    When I upload a PDF or an image with the File Manager, is it possible to get the address to that PDF or image with one of the helpers?

    Why? Well, I was thinking of embedding 3D FlipBook (3dflipbook.net/simple-tag-pdf) to one of the pages on my website and for that to run well, I have to be able to generate the path to the pdf.

    Jeroen

    #10098
    Avatar photo[anonymous]

    Sure. If you upload a file using the Tools & Plugins > File manager, without choosing the media/files location , the URL will be something like: http://www.yourdomain.com/your-file-name.pdf

    However, if while in Tools & Plugins > File manager, you choose to upload to the ‘media/files’ link location using the link provided, your final URL will be something like  http://www.yourdomain.com/media/files/your-file-name.pdf

    #10099
    Avatar photo[anonymous]

    Thank you!

    Haven’t thought about that:
    There is not need to generate the path (except the domain); the last part can be hard coded!

    Problem solved!