Firefox PHP

mod: upload attachments in directory, not db

Posted by dissurion 
All files from this thread

File Name File Size   Posted by Date  
mysql.fs-attachments.php.zip 27.6 KB open | download miles 03/03/2006 Read message
mod: upload attachments in directory, not db
November 17, 2005 09:20AM
--download mod_attachments_fs: [www.dissurion.com]
--description: Uploads attachments to a directory on your server (must be writeable by the server) instead of into the database. It uses the file id to generate a unique filename so no overwriting takes place with identical filenames.

I thought someone already made this, but couldn't find it. So tried this myself.

for 5.1 only



Edited 2 time(s). Last edit at 11/22/2005 11:49PM by dissurion.
Re: mod: upload attachments in directory, not db
November 22, 2005 11:33AM
i don't understand how it works. i anable mod_attachments_fs in modules? but when attached file it still stored in mysql. not in mods/mod_attachments_fs/attachments/

what's wrong?
thanks.
Re: mod: upload attachments in directory, not db
November 22, 2005 11:43AM
Your file should be in the directory, and some info about the attachment should still be in the database. Only not the actual content of the attachment, which is not kept in the database but put in the directory.
Keep in mind that the directory needs to have write permissions.
Also, I'm working on a better version now where you can set the directory you like in the admin.

................................
[www.dissurion.com]



Edited 1 time(s). Last edit at 11/22/2005 11:44AM by dissurion.
Re: mod: upload attachments in directory, not db
November 22, 2005 01:01PM
i understand. i downloaded your module, activated it (set to ON), but when i attach file it puts ALL in mysql and nothing to the "attachments" dir :((
maybe there is some settinds that shoud to do? it will be very nice that you write some readme for help to install this module.
thanks.

p.s. I use phorum 5.0.20. maybe this module for phorum 5.1.x?



Edited 1 time(s). Last edit at 11/22/2005 01:06PM by starua.
Re: mod: upload attachments in directory, not db
November 22, 2005 02:20PM
Starua, your guess is correct. This mod uses hooks that are only in the development tree for Phorum 5.1.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: mod: upload attachments in directory, not db
November 22, 2005 11:48PM
Sorry, forgot to make that clear. :( And you're right about the readme's too.

................................
[www.dissurion.com]
Re: mod: upload attachments in directory, not db
November 23, 2005 12:18AM
I wrote it. Its in the 5.1 distro.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: mod: upload attachments in directory, not db
November 23, 2005 12:53AM
You mean you wrote the same module and will put it in 5.1?

................................
[www.dissurion.com]
Re: mod: upload attachments in directory, not db
November 23, 2005 12:27PM
I thought I had it in the distro. Its in SVN now. You can download it through the Trac web interface or in a recent svn dump.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: mod: upload attachments in directory, not db
December 15, 2005 11:43AM
Quote
brianlmoon
I thought I had it in the distro. Its in SVN now. You can download it through the Trac web interface or in a recent svn dump.

Hello Brian,

File storage backend is especially important to me (as data posted as attachments are also used by other scripts on my site, as well as for DB storage space). As I understand, running the conversion script from a v3 phorum will end up in all attachments being inserted in the DB. But the fs_attachment provided on the cvs version would only handle new posting, am I wrong ?

TIA
Sorry, only registered users may post in this forum.

Click here to login