how attachements are stored

15 views
Skip to first unread message

pascale roquet

unread,
May 3, 2022, 11:25:57 AMMay 3
to Trac Users
Dear all,

I am new to this list.
I am using Trac version 1.0.13
I would like to now how the attached files are stored and renamed on the file system
and if it is possible to retrieve the file PATH from the database
but I am not sure if it is possible because  I have explored the database with sqlite3 commands and the table "attachment" does not contains the information about the actual file PATH

thanks for your help

Pascale

RjOllos

unread,
May 3, 2022, 11:36:23 AMMay 3
to Trac Users
The attachment path is hashed on disk. This is done to handle long filenames, incompatible characters, etc... If you want to retrieve the path on disk, you can use the Attachment class, something like:

a = Attachment(resource, filename)
a.path

Ryan

Reply all
Reply to author
Forward
0 new messages