View Full Version : How to identify a file to attachment id ?
Hello
Could someone tell me please is there any easy way to find a file by ID ?
for example I see link to attachment - /attachment.php?attachmentid=72697&d=1390755704
but the file name is /customattachments/9/4/7/2/8/67174.attach
So, how/where to get that info in most easy way (like some search field or a table or ...) ?
Thank you
9/4/7/2/8 > 94728 in the path of the file on the server is the userid of the user.
72697 is the attachmentid in the attachment table.
You could query SELECT userid FROM attachment WHERE attachmentid = 72697 to get the userid.
i dont need the user id. i can see who posted attachment. i need to know the name of real file if i know only like this - /attachment.php?attachmentid=72697
It's stored in the same table as filedataid.
SELECT filedataid FROM attachment WHERE attachmentid = 72697
The filedataid should be the name of the .attach file.
I'm sorry, I just don't get it - what to do exactly?!..
could you please provide me with step-by-step instruction?
Thank yoy anyway!
--------------- Added 1457777231 at 1457777231 ---------------
So, I see link /attachment.php?attachmentid=72697 in post.
I go to /admincp/queries.php?do=modify
what exactly should I do there?
You execute the query I posted in my previous post. You will then see the filedataid which belongs to the attachment which you can then use to track the file on the server.
SELECT filedataid FROM attachment WHERE attachmentid = 72697
An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'vb.attachment' doesn't exist
Do you use a table prefix? (You can check that in the includes/config.php file). You have to prepend that prefix to "attachment".
So if your prefix is "ka81_" then you should change it to ka81_attachment.
Whenever I need to find a file from ID I just put the number in to the vbulletin search and check the post it's in.
Whenever I need to find a file from ID I just put the number in to the vbulletin search and check the post it's in.
I nkow post! I know even author!
I CAN NOT see what file was for that attachment!
it says - Invalid Attachment specified. If you followed a valid link, please notify the administrator
and that's all, no more any info!!!
--------------- Added 1457781656 at 1457781656 ---------------
Dave
thank you very much!
but what if query don't give any result?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.