abdfahim Well-known member Mar 3, 2017 #1 Is it possible (if possible, is there any guide) to get the link to the attachment(s) from the post/attachment ID? Last edited: Mar 3, 2017
Is it possible (if possible, is there any guide) to get the link to the attachment(s) from the post/attachment ID?
Mike XenForo developer Staff member Mar 3, 2017 #2 The xf_attachment table has the attachment ID as the primary key, if you have that ID. Within that, there are content_type and content_id columns. The content type here would be "post" (and the content ID is the post ID).
The xf_attachment table has the attachment ID as the primary key, if you have that ID. Within that, there are content_type and content_id columns. The content type here would be "post" (and the content ID is the post ID).
Smooth Active member May 2, 2018 #3 @Mike Useful - thank you. Is there then a way to navigate to that specific post with the ID?
P Paul B XenForo moderator Staff member May 2, 2018 #4 Yes, using: https://xenforo.com/community/posts/1137490