MyBB Community Forums

Full Version: About attachements
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when we upload a file which is uploaded to /uploads/$date
if its possible to upload without chancing extention to .attach.
keep the real extention...that would be great like in VB

that is really usefull for me...


and multiple uploads at the same time...
come on fellas no one has any idea???
The only issue is if someone uploads something with the same file name. There has to be something added to make them unique.
right...
but it can be like this "uploads/$date/{att.id}example.zip"

is it??
The reason the files are given the attach extension is for security reasons. If the extension is not changed then a user can upload a malicious script (written in any server-side script language) and will be able to access it using the url to the uploaded script and could gain access to your server like that. You can disable scripts for the upload folder but not everyone knows how to do that so its easier to just have the extension changed to a non-script extension.

If you must have this then you can achieve this with a file edit. inc/functions_upload.php around line 445 the $filename variable is where its setup.