Triops
Well-known member
Because auf my disaster here I have to manually edit around 200 (out of 112.000, which is quite good but annoying though) attachments (in posts, media gallery & conversations), so that they can be accessed. At the moment they have wrong data_ids and cannot be found.
I thought I found it, but it does not work.
table xf_attachment
has an attachment_id (which is accessed in forums) and a data_id
table cf_attachment_data
references data_id and has a file_hash
thumb is stored in directory /data in directory, file in dir internal_data, both with first 3 digits of data_id,
eg. thumb 113229-94223cf793d58ea8cfaf791400bf2cc6.jpg is saved in /data/113/
file 113229-94223cf793d58ea8cfaf791400bf2cc6.data is saved in /internal_data/113/
So, it should be possible to edit data_id in both tables and put files with correct data_id + file_hash in correct directory and then one should view thumb and file in forums?
Am I right or is something missing? I ask, because it does not work, the images do not show. I have 200 images after last backup before disaster, where these files where renamed to higher data_id.
/* edit - found it, I made mistakes, but it works, as I described */
I thought I found it, but it does not work.
table xf_attachment
has an attachment_id (which is accessed in forums) and a data_id
table cf_attachment_data
references data_id and has a file_hash
thumb is stored in directory /data in directory, file in dir internal_data, both with first 3 digits of data_id,
eg. thumb 113229-94223cf793d58ea8cfaf791400bf2cc6.jpg is saved in /data/113/
file 113229-94223cf793d58ea8cfaf791400bf2cc6.data is saved in /internal_data/113/
So, it should be possible to edit data_id in both tables and put files with correct data_id + file_hash in correct directory and then one should view thumb and file in forums?
Am I right or is something missing? I ask, because it does not work, the images do not show. I have 200 images after last backup before disaster, where these files where renamed to higher data_id.
/* edit - found it, I made mistakes, but it works, as I described */
Last edited: