Hello Collective Access Community,
I am currently working on a project that involves creating a Node.js application that interacts directly with the Collective Access database—and needs help generating preview URLs/paths for media stored in object representations.
In my exploration, both through the source code and the official documentation (particularly this section [https://manual.collectiveaccess.org/providence/developer/api_getting_data.html]), I've understood that "media fields must be processed to resolve URL and server paths prior to use."
By looking at the source code, I found that HASH and MAGIC fields get set during the media processing, which is crucial in generating the URLs for media previews. Still, those values are not readily available in the ca_objects_representations table. I am seeking guidance on accessing and utilizing these fields within a Node.js environment to construct the appropriate preview URLs for media associated with object representations.
For reference, this is the code that I'm trying to replicate in my Node.js app: [https://github.com/collectiveaccess/providence/blob/master/app/lib/BaseModel.php#L3767].
I would appreciate any insights, examples, or documentation references that could aid in navigating this aspect of Collective Access.
Thank you so much for your time and assistance. I look forward to any suggestions or guidance you can provide.