Mailing List Archive

how attachements are stored
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

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/38ad544e-47be-499b-818b-00b719a64a56n%40googlegroups.com.
Re: how attachements are stored [ In reply to ]
On Tuesday, May 3, 2022 at 8:25:57 AM UTC-7 pascale2...@gmail.com wrote:

> 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
>

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

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/5e12f0dd-26b3-4929-ba00-83005cb51909n%40googlegroups.com.