Attachment physical_filename

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
EAM
Registered User
Posts: 93
Joined: Mon Nov 24, 2008 12:45 pm

Attachment physical_filename

Post by EAM »

How is the physical_filename in the phpbb_attachments table derived? I can see that the first set of numbers is the user id followed by the '_' but what determines the rest? Thanks
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Attachment physical_filename

Post by 4_seven »

i think a rand() (or/and) md5, calculated on original filename..
Ather
Registered User
Posts: 1032
Joined: Fri May 08, 2009 9:42 am
Location: Kingdom of Bahrain
Name: Ather Akber

Re: Attachment physical_filename

Post by Ather »

yes, its md5'd using the message parser
CPL Syed Ather Akbar
Regional Command Southwest
Camp Leatherneck, Afghanistan

My Mods/Snippets
User avatar
EAM
Registered User
Posts: 93
Joined: Mon Nov 24, 2008 12:45 pm

Re: Attachment physical_filename

Post by EAM »

I have a file in my phpbb_attachments table, acp.jpg, and when I do a md5('acp.jpg') or md5('acp') I don't come up with the physical_filename after the '_'. So how important is the physical_filename? It would be easy to use the uid & '_' and add the md5() of the real filename but does phpbb use that or does it use the uid and the real file name to come up with the physical_filename in the table for accessing? I need to manually add items to that table. Thanks
User avatar
EAM
Registered User
Posts: 93
Joined: Mon Nov 24, 2008 12:45 pm

Re: Attachment physical_filename

Post by EAM »

FYI, I just did my own tests and found that if I just change the last part in the attachments table and then the file name in the files directory, the program finds the correct file. Of course, I'll have to make sure that that userid doesn't have duplicates or conflicts but I think I can work around that.
Locked

Return to “[3.0.x] MOD Writers Discussion”