Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

FileUpload 1.1 Released

TimTim Vanilla Staff
edited September 2010 in Vanilla 2.0 - 2.8
This plugin enables file uploads (as attachments) to discussions, comments and conversations. Multiple files can be uploaded simultaneously using AJAX.

If your server is configured properly, a realtime upload progress bar will also be displayed.

Upcoming versions will allow file management from the dashboard, as well as an implementation of thumbnails.

Vanilla Forums COO [GitHub, Twitter, About.me]

«1345

Comments

  • Wow just fantastic Tim!

    Any chance in the future of this displaying images from V1 Attachments? I have a V1 forum with tons of images uploaded and displayed using attachments and can't really consider switching until the images can come with me.

    Thanks for the great plugin!
  • TimTim Vanilla Staff
    That will be something for @Todd's importer to deal with.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • TimTim Vanilla Staff
    edited September 2010
    Also bear in mind that when someone develops a plugin for Version X, and you upgrade to Version Y, it is still the plugin developer's responsibility to maintain that functionality... not ours.

    I've seen a few comments that seem to imply that the community expects core support for plugin features when upgrading. While this would be nice, its not entirely feasible.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • @Tim I'd throw another lightswitch rave, but I'm still smarting from how hard the last one got voted down. Nice work. :)

    @Desmanthus We may create a separate plugin for importing files after a data import. Trying to bring files along with the data import would make it incredibly more complex and time-consuming to execute.
  • @Tim Is this on GitHub?
  • TimTim Vanilla Staff
    @Lincoln its in our private plugin repo. Talk to mark?
    Thanks for the virtual rave :D

    image

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • Im running vanilla 2.0.3 and got an error on the requirements:

    FATAL ERROR IN: PHP.Gdn_ErrorHandler();

    "FileUpload is missing the following requirement(s): Vanilla 2.0.2."
    LOCATION: /var/www/html/vanilla/library/core/functions.general.php
    > 330: if (count($MissingRequirements) > 0) {
    > 331: $Msg = sprintf("%s is missing the following requirement(s): %s.",
    > 332: $ItemName,
    > 333: implode(', ', $MissingRequirements));
    >>> 334: throw new Gdn_UserException($Msg);
    > 335: }
    > 336: }
    > 337: }
    > 338: }
    BACKTRACE:
    [/var/www/html/vanilla/library/core/class.pluginmanager.php 462] PHP::CheckRequirements();
    [/var/www/html/vanilla/applications/dashboard/controllers/class.settingscontroller.php 510] Gdn_PluginManager->TestPlugin();
    [/var/www/html/vanilla/library/core/class.dispatcher.php 276] SettingsController->TestAddon();
    [/var/www/html/vanilla/index.php 38] Gdn_Dispatcher->Dispatch();
  • TimTim Vanilla Staff
    Check your index.php file, right at the top. You should see something like:
    define('APPLICATION_VERSION', '2.0.3');

    Either way, 2.0.3 SUCKED, I suggest 2.0.6

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • edited September 2010
    Thanks for the response @Tim.

    As you know, attachments for V1 was pretty widely used and I think support for converting/importing attachments would encourage many V1 users to upgrade.

    Since Vanilla2 is now developing it's own "official" file upload plugin, maybe it is something that could be included. If I upgrade without my members' attachments they will put my head on a stick. :)

    Just my two cents. Thanks for all the great work and for the best forum software out there.

    Also..When trying out this plugin i see an upload bar, but wait and nothing happens. The image I am trying to upload is about 100k.

    Update: @Lincoln Whatever/whoever makes it happen is fine by me. Thx.

    PS I'm just drooling to be able to upgrade to V2 my V1 forum. Members are going to LOVE it.
  • yeap it does say that.

    <?php
    define('APPLICATION', 'Vanilla');
    define('APPLICATION_VERSION','2.0.3');
    /*
  • We seem to be missing the table definition for gdn_media (or I am)

  • TimTim Vanilla Staff
    I might have left it out of the setup method, since this has been hosted on our .com service where those tables already exist. I'll fix it asap.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • TimTim Vanilla Staff
    Actually just looking at it now, the plugin (if you enabled it via Vanilla and not though your config file) should have executed its Setup() method, which contains the table definition.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • i'm getting an unhandled JS exception in firefox when I try to attach files. This happens after the file is selected and the JSON POST request has been sent.

    This is the exception showing in firebug:uncaught exception: Invalid JSON: {"MediaResponse":{"Status":"success","MediaID":"4","Filename":"file.jpg","Filesize":138495,"FormatFilesize":"135.2K","ProgressKey":""},"FormSaved":true,"DeliveryType":"VIEW","Data":"","StatusMessage":"","RedirectUrl":""}

    This is the contents of the response: {"FormSaved":true,"DeliveryType":"VIEW","Data":"(-- i snipped the base64 here --)","StatusMessage":"","RedirectUrl":""}

    The GDN_Media table was created correctly and my attachments are being inserted into that table correctly. But they do not show up with the comments.

    Not sure what's going on. I do not have APC installed.
  • TimTim Vanilla Staff
    @ithcy We're drawing a blank here as far as figuring out what caused your problem. We'll need to dig deeper, and for that to happen I'd be much obliged if you'd provide the following:

    - A copy of your fileupload.js file
    - A list of your currently installed plugins
    - Browser name and version
    - OS name and version
    - Vanilla version

    Thankyou :)

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • TimTim Vanilla Staff
    You can send the file to my vanilla email address.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • JeffDunneJeffDunne New
    edited September 2010
    Thanks for that @Tim (thanks for the plugin too, will make a lot of my users happy)

    Not sure what happened the first time, but disabling and re-enabling fixed the problem.

    Clearly something screwy on my server.



  • Bugs:

    - It does not work with Opera browser (says Uploading... and does nothing).
    - When you edit post and click "Attach file", file upload form appears, but it also appears at the bottom form (2 of them) and that does not disappear after you finish editing (at least in Chrome browser).
  • ithcyithcy New
    edited September 2010
    Hi Tim, thanks very much for looking.

    After some more debugging I found the problem. This plugin is not compatible with the Greasemonkey addon for firefox. When I disable Greasemonkey I'm able to attach files.

    However TiGR's second issue is valid and happens in Firefox as well. The issue appears to be that, when editing a post, you have multiple DIVs on the page with the same ID ('CurrentUploader'), and each of those divs is matched by the selector in fileupload.js line 12, so they each receive the html append on line 121.

    these guys just need unique IDs.
  • TimTim Vanilla Staff
    Good catch. I'll fix'r

    Vanilla Forums COO [GitHub, Twitter, About.me]

This discussion has been closed.