Find the location of a stored attachment
Use the FilesUtilService.getFileById command to locate a file attachment in a directory.
Many commands require an ID as an input parameter, including library IDs, user IDs, policy IDs, and file IDs. We can find an ID by using special commands. When we run...
WikisMemberService.getByEmail(string email)
...where you provide a user's email address as input, the output includes the user's ID. We can also find IDs by using feeds. See Connections API documentation.
In network deployments, files attached to wiki pages are stored on a shared file system. This command can be useful when restoring backup versions of data.
- Start the wsadmin client.
- Start the Wikis Jython script interpreter :
execfile("wikisAdmin.py")
- Run to locate a file attachment stored in the file directory:
WikisUtilService.getFileById(fileId)
where fileID is the ID of a file stored in the database. The ID must be a string in UUID format:
00000000-0000-0000-0000-000000000000
The command returns the file path as a string, even if the file is not in use.
Parent topic:
Administer Wikis