I am updating a custom plugin that utilizes the Knowledge Document Type and uses the getInternalFilename() to get the absolute path of the document. That function has been deprecated, what is the preferred replacement, as I still need the absolute path of the document. Would getExternalFilename() return a similar value.
Discussion posts and replies are publicly visible
Find some alternatives here: https://docs.appian.com/suite/help/24.2/api/com/appiancorp/suiteapi/knowledge/Document.html#getInternalFilename()
You can also check other plugins from the app market for the included source code.
A word of caution here. My experience with developing plugins is quite limited.
Preferred way is to use the file stream APIs instead of the deprecated ones. Have listed a few use cases for working with documents.
For reading, use getInputStream of Document object returned by ContentService.download() api by passing the document id.
For updating an existing document, similarly use getOutputStream and write to the DocumentOutputStream returned.
For creating a new document, create a new Document object, call contentService.uploadDocument which returns a ContentUploadOutputStream. Then write data to this output stream. Note that the getContentId method returns the newly created document id.
Did you try documet(documentID,”URL”) ?