XF 2.1 How to get the attachment image paths? phpmyadmin shows blank for long varchar

HJW

Active member
I'm trying to get the attachment image paths for all attachments in a thread.

I guess this is stored in image_path in attchment_data, but phpmyadmin is showing as empty - I guess because its a long 250 varchar. Is there a way to show this?

thanks

SELECT * FROM xf_post as p, xf_attachment as a, xf_attachment_data as d
WHERE p.thread_id = 'xxx'
and a.content_id = p.post_id
and d.data_id = a.data_id

Actually that seems wrong as the file_path should be empty - https://xenforo.com/community/threa...-xf_attachment_data-table.101261/#post-957058

So still a bit lost on where to get the path for attachments from the db and the folder they're in
 

Brogan

XenForo moderator
Staff member
The paths are defined in code as 'internalDataPath' => 'internal_data' and 'externalDataPath' => 'data'.

Those paths can be overwritten in config.php.

Files are then saved sequentially in directories (attachments, avatars, etc.) numbered from 0 onwards, with 1,000 file in each directory.
 
Top