Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

file attachments in vanilla

edited July 2005 in Vanilla 1.0 Help
Hello (my first post here!!), I was just wondering if anyone has considered file attachments for comments and discussions in Vanilla yet? I think this would be an invaluable extension (there is now way it should be in core). I would like to see one that supported any file type, and allowed administrators to set upload quotas to the users. Maybe even restrict file uploads to specific roles. They should get stored in a directory on the server, and not in the database. I speak from experience with this, as I work on Drupal, and we have recently moved the file store module uploads from the database to a directory. Your feedback is much appreciated.

Comments

  • Options
    MarkMark Vanilla Staff
    Lots of people have requested this one. Man... I've got to finish that documentation so I don't have to do everything :)
  • Options
    yeah, do that. the community will help.
  • Options
    I can lend a hand, but, as you say, the documentation would help a great deal.
  • Options
    thats actually not such a bad idea. EXTENSION!!!
  • Options
    lechlech Chicagoland
    I have an outline in mind for this one if anyone cares to take a stab at it. It would require an extra sql table of it's own probably if you wish to prevent leaching of bandwidth.
  • Options
    what would the extra table do? Just curoius. If you wouldn't mind sending through the outline. I would like the see what you had in mind. (soon... you could attach said file ;) )
  • Options
    lechlech Chicagoland
    well, the extra sql table would be where you would store said file. unless of course you're uploading it so anybody else can hotlink from your server than go for it that way. But if you lock it into the sql table, and say make it so that only users of vanilla can view it that makes the content a bit safer in terms of storage.
  • Options
    i'm pretty partial to both ideas. do you think there would be a way to make said images visible OR private?
  • Options
    lechlech Chicagoland
    pretty sure it's possible, I'm still a novice when it comes to creating sql rules/queries and high-level php. So I think this would be left to someone who knows their way around. I'd be more than willing to take a stab at it when I get the chance though.
  • Options
    I would prefer it if the files were stored in the file directory, and not in the database. Large file transfer (or the heavy traffic with small files) can lead to a hefty database drag. I am speaking from experience here.
  • Options
    MarkMark Vanilla Staff
    I think lech was talking about storing a reference to the file in the database, and placing the files in a non-web-accessable folder. Then using php to serve the file from the filesystem after it retrieves the file location from the database. But I could be wrong.
  • Options
    lechlech Chicagoland
    edited July 2005
    I was actually thinking about storing the actual files in sql, as silly as that may seem. Not just the reference pointer, but EVERYTHING :) that way you NEED to be logged into the forum to get any data out of it :) I guess also to some extent, it can be global or sorted via user with a thumbnail preview page if necessary. This would probably need it's own DB tables though. But it could be done either way.
  • Options
    i must say for a vareity of reasons storing the files in folders with references held in a database does seem like an easier/better option.

    I guess this whole thing fits in much better with the vanilla-filebrowser crossbreed too.

    Maybe we need fileilla. Or we could call it filezilla, and ruin the internet with endless productions of utter shite.

    Good idea though. seriously.
  • Options
    ithcyithcy New
    edited July 2005
    filezilla: already exists (the mozilla ftp client) it's not unheard of to store binary data directly in the database. mysql has a binary data type. however it's not a widely recommended practice for a few reasons. mysql in particular suffers badly in performance because of the way it sends data to clients. mysql excels at fast text operations. it's just not built for binary storage.
  • Options
    lechlech Chicagoland
    lol, filezilla is just a sourceforge project, i don't think they have anything to do with mozilla :) And I wasn't thinking of holding any kind of data over 80kb, more or less like user icons or something that get base64 encoded. While that might put a bigger stamp into the database, it's still stored as text :D
  • Options
    itchy: I don't believe there is a mozilla ftp client, but you can get an extension for firefox called FireFTP
  • Options
    for some reason i always had the idea that filezilla was part of mozilla. thanks for smashing my dreams.
  • Options
    "thanks for smashing my dreams."

    HAHAHAHAHA!!! so dramatic, i love it!
  • Options
    lechlech Chicagoland
    /me was always known to ruin ones illusions
This discussion has been closed.