Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: gevv on February 19, 2021, 10:26:42 AM

Title: Attachments .dat file ?
Post by: gevv on February 19, 2021, 10:26:42 AM
Hello,

when a file is attached to the post or topic


there are two of the same file one has the extension .dat 

sample

upload  image.jpg

1_bc15ef5381615ef185896badfab8b5.dat  ---  10kb
1_bc15ef5381615ef185896badfab8b5  ----   10kb

why a copy of a file is created ?


Title: Re: Attachments .dat file ?
Post by: shadav on February 19, 2021, 01:36:38 PM
my guess would be if you are using a mod and in the attachment settings you have checked the box for the mod that says
Keep backup of original image file when resizing
Title: Re: Attachments .dat file ?
Post by: shawnb61 on February 19, 2021, 02:23:16 PM
The .dat extensions are used in 2.1.  There is no extension in 2.0. 

My suspicion here is that you tested an upgrade of 2.1, restored files (without deleting first), and thus the .dat from the 2.1 conversion is still laying around. 

(I have definitely done this before myself! ;D)
Title: Re: Attachments .dat file ?
Post by: gevv on February 19, 2021, 03:11:19 PM
yes conversion problem  thanks.

opening post attacment no problem (.dat without extension)

but error log occurs


/index.php?action=dlattach;topic=8262.0;attach=11142
/Sources/ShowAttachments.php (Line 204)


2: md5_file(attachments/11143_6068b3379684f72749537dd4796e6e471cd91ef.dat): failed to open stream: No such file or directory
Title: Re: Attachments .dat file ?
Post by: shawnb61 on February 19, 2021, 04:29:19 PM
Is this 2.0 or 2.1? 

In 2.0, there should be no extension...