Forum Discussion
hashed filenames in published output
- 2 months ago
if you are really precise, the filename is not a hash - it is independent of the content.
It is generated when the medium is imported - a GUID-4 is generated, e.g.
- "06a3dc93-48e9-4ac5-97d2-cec1cd3df540"
- the guid is then split into its 5 blocks
- the last two blocks are removed
- the first three are put together backwards
- the whole thing is now converted to base62
- at the end, an “R” is added in front and the appropriate file extension is added
- result: "R5wlhTmswUhH.png"
if you now parse “story/story.xml” in the .story file, you can find out the mapping between the original file name and the generated file name
- "06a3dc93-48e9-4ac5-97d2-cec1cd3df540"
this file, what you found was a ".xml.rel" file - this don't help you
- rename the .story to .zip
- extract the zip
- you need "./story/story.xml"
if you have a good xml editor, open story.xml
or
- download Notepad++ and install (or use the portable version)
- enable the XML Tools
open story/story.xml
- all important infos are in line 1 !!!
- beautify the xml
now you can see the infos for all imported media files, e.g.
g = "3181b10f-8857-43eb-bfe9-7d95d79938b4"
displayName = "png-32.png"
- storyline uses "g" (GUID-4) to generate the new filename
- "displayName" is the original filename
with the algorithm from above
- "3181b10f-8857-43eb-bfe9-7d95d79938b4" => "R5pXHZ6Y4dCB.png"
result
- "R5pXHZ6Y4dCB.png" => "png-32.png"
Thanks Jürgen for the great insight.
As an interesting aside, after looking at the story.xml content I discovered that you can also directly access (at least read) the built-in storyline variables from JS by using the listed propPath values.
GetPlayer().GetVar("_playerVars.currentSlideId");
Never thought you could do that. You learn something new everyday.🙂