I stumbled across an Apex method in the documentation recently that would generate a URL for the download link for a standard Attachment, with a name something like getDownloadLink(). I don't remember the System class or what parameters it took, but I'd prefer using that in the backend to hardcoding
'/servlet/servlet.FileDownload?file='+myAttachmentId
Does anyone know where I can find this method? I made a mental, but not physical, note of its location in the docs... :(