AI OnAI Off
It kind of depends where you will be storing the link, if you just insert it into either a URL property or a XHTML property we will automatically convert it into a permanent link before it is stored in the database.
We had no plans to CMS the link, you see. So we just want to statically reference a file the same way we reference a page using GetPage().
So GetFile(FileId) would provide a file object we could grab the URL from.
I take it this isn't possible then? :(
You need to access the permanent link API's yourself and convert a GUID to a path and the other way around, more info here.
Ah brilliant, thanks for the that Per, very much appreciated! :-)
Cheers,
Karl.
I can't seem to find an answer to this, though I'd imagine it's quite straight-forward!
I've uploaded a PDF to EPiServer using the document management interface, and now I'd like to programatically link to that in the code, so that when I rename that file, the link will be preserved. I don't want to link to it within the CMS, just directly fetch the file within the code.
How do I do this? Maybe I'm just looking in all the wrong places!
Thanks for any help!
Cheers,
Karl.