Forum

Forum breadcrumbs - You are here:ForumGeneral: Chit-chatBulk load media into RM
Please or Register to create posts and topics.

Bulk load media into RM

Hi all,

I have over 3000  photos that were linked to people in another program. I want to bulk load these into RM. Each photo has a unique number like 0.jpg, 1.jpg, 2.jpg, ... and I have a table that links each photo to RIN of each individual in the photo. So my question is how to best do this using SQLite. I actually have 3 copies of each file, a thumbnail, a web photo resolution, and a high res scan. and file can be in jpg, png, or tif. I also have date, title, and description information for many of the photos. I think I can probably figure out the relational linking but if anyone has it mapped out that would save some time.

Where I'm kind of lost is how to create the thumbnail blob in the MultimediaTable. I will probably build this tool in Python so I can move files into a directory structure and can use it to create the thunbnail blob and update the database.

Thoughts?

Ok, think I figured this out by saving a thumbnail blob to a jpg file and running the following script on it. It outputs the same value as in in the hex editor. So in all likelihood, we just save the binary jpg thumbnail in this field.

import binascii
filename = 'test-thumbnail.jpg'
with open(filename, 'rb') as f:
content = f.read()
print(binascii.hexlify(content))