Forum OpenACS Development: How do I get filename from photo_id? And album name from album_id?

Hi!

These are two questions regarding photo-album:

- How do I get filename from photo_id? I'm trying to get file properties and exif properties
- How do I get album name from album_id? I'm trying to put album name in photo info (Example here)

Thanks
Cesáreo

the table pa_photos should have helpful columns, this after checking a really ancient version of photo-album. You can try looking at...

(your service)/packages/photo-album/sql/postgresql/photo-album-create.sql

to see what the data model is. You might have to become familiar with the content repository tho.

album_id is also a content item id

the name is in the content repository, table cr_items, column name

Hi Jim

I've seen pa_photos, so for each photo_id I can get:

Table "public.pa_photos"
Column | Type | Modifiers
----------------+-----------------------------+-----------
pa_photo_id | integer | not null
caption | character varying(500) |
story | text |
user_filename | character varying(250) |
camera_model | character varying(250) |
date_taken | timestamp without time zone |
flash | boolean |
focal_length | numeric |
exposure_time | numeric |
aperture | character varying(32) |
focus_distance | numeric |
metering | character varying(100) |
sha256 | character varying(64) |
photographer | character varying(200) |

so, at least user_filename. But I think I'd had to bind filename with content repository ID.

About album, I saw pa_albums:
Table "public.pa_albums"
Column | Type | Modifiers
--------------+-----------------------------+-----------
pa_album_id | integer | not null
story | text |
photographer | character varying(200) |
taken_start | timestamp without time zone |
taken_end | timestamp without time zone |
iconic | integer

So I could get story of the album, not the name.

Definitively, I had to study how to manage content repository.

Thanks for your points!
Cesáreo