View Full Version : Attachemnts outside DB
Xtrato
01-26-2009, 07:57 PM
Is there a hack that allows this? an attachment outside the actual database, im helping a customer and his old wm didnt installed something , so his database is 700MB!!! , its crazy.. hard time porting it over..
So is there a hack that does this, saving attachments outside database.
Thanks you for your time.
--------------- Added 1233007200 at 1233007200 ---------------
i think i found where..
However , now how do i move the attachments FROM database to like some other place , yet still retaining the post and images.
Thanks
cellarius
01-26-2009, 08:05 PM
That's basic vB functionality, no need for a mod. Go to AdminCP, Attachments, the last menu entry there (dont know exact english phrasing, mine is German). Something like Save mode. There you can move the attachments from the database to the file system and vice versa.
Nothing will break if you use this. After you moved the attachments to file system, you there can move them to another folder, too.
Lynne
01-26-2009, 08:15 PM
You need to create a folder first to move them to. Make sure to chmod it to 777 and it should be above your forum root. Then just go to Attachments > Attachment Storage Type > Move to Filesystem (or something like that) and it will ask for where and you put in the full path (/home/yoursite/attachments) and then Continue
Xtrato
01-26-2009, 09:15 PM
ok thank you both
another quick question, will the "Current" attachments be moved from the database into the newly created folder or no?
thanks
Lynne
01-26-2009, 10:57 PM
Yes they will be moved.
Xtrato
01-26-2009, 11:06 PM
Great stuff, thanks for the info! , hopefuly wont take years.
Dismounted
01-27-2009, 04:03 AM
Also, you should place the attachments directory behind the web root (i.e. /home/user/attachments, not /home/user/public_html/attachments).
Xtrato
02-04-2009, 05:29 PM
oh ,
i already moved them to pubilc_html/etc/ , if i change directories , will it also move the files once again?
thanks
lasto
02-04-2009, 05:42 PM
Also, you should place the attachments directory behind the web root (i.e. /home/user/attachments, not /home/user/public_html/attachments).
Can u explain why - and will members still be able to access that Dir - reason asking is because i have my attachment folder inside the VB folder.
Cheers
Lynne
02-04-2009, 08:18 PM
From the manual:
The attachment file path is the location on your server that you wish to store attachments in. We suggest you create a path that is above your web root, which means a directory that is not below public_html. If you wish to create the directory in your web root, we then suggest you place a .htaccess file to block people from accessing it directly. If you do not do this, then anyone will be able to open your attachments directly by navigating this directory in their browser.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.