How is the media file folder id generated? (creating media objects programmatically)
Withing the media folder (site files) each media file has a bath like so:
\media\12345\file_name.pdf
What does the id in bold represent? It's not the media object ID (I've checked). I'm creating media objects and uploading the files to the media folder and was wondering how to create the folder name:
How is the media file folder id generated? (creating media objects programmatically)
Withing the media folder (site files) each media file has a bath like so:
\media\12345\file_name.pdf
What does the id in bold represent? It's not the media object ID (I've checked). I'm creating media objects and uploading the files to the media folder and was wondering how to create the folder name:
Nevermind I found out it's generated from the property id like I thought. The code above is right!
Hi James,
The id in the filepath maps to the row id for the "umbracoFile" property in the cmsPropertyData database table.
Not sure how to access that via the API... to be honest, I'd have thought that media.getProperty("umbracoFile").Id would have worked?
Cheers, Lee.
Doh! Cross-posted, didn't see your reply before writing mine! :-)
Thanks for the reply anyways Lee!
is working on a reply...