Forum OpenACS Development: Re: Play with Content Repository

Collapse
Posted by Iuri Sampaio on
By the way,

why file storage allows name larger than 255 bytes?

Collapse
Posted by Dave Bauer on
The length on cr_items.name is 400 characters. Do you really have a directory name that is that long?

The filesystem filename is stored on postgresql in cr_revisions.content. From there you can get the path under content-repository-content-files directory to locate the file.

Collapse
Posted by Iuri Sampaio on
regarding cr_items.name,
The client came up with the necessity to replicate CR to the filesystem.

I will play a bit with the API [fs::publish_object_to_file_system] and see what happens.

Unless there is a good motive to 400 chars, in my view the field should be limited to 255 chars.

i hadn't looked at cr_revisions table before i open the thread. To track the path of the file is much easier than i thought. Somehow i thought CR used a complex method to organize them. I always go through the hardest way! Thanks!

Collapse
Posted by Dave Bauer on
Yeah look through all the CR apis. There is a tcl proc to get the file path and probably useful procs for your task.

re: cr_items.name, I doubt we will change that now, but you can certainly limit it in your application.