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

124

Comments

  • TimTim Operations Vanilla Staff
    Today I'm fixing this plugin. Look for an update in the next 8 hrs.

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

  • if anyone wants to actually display the uploaded images along with the comments, instead of just presenting download links, you can replace plugins/FileUpload/views/link_files.php with this:
    Attachments

    <?php
    foreach ($this->CommentMediaList as $Media) {
    if (strpos($Media->Type, 'image/') !== FALSE) {
    ?>

    imagePath; ?>"/>

    <?php
    } else {
    ?>

    imageGetWebResource('images/gear.png'); ?>"/>
    MediaID}/{$Media->Name}"); ?>"><?php echo $Media->Name; ?> (<?php echo Gdn_Format::Bytes($Media->Size, 0); ?>) <?php } } ?>

    Just tweak the HTML and your theme to your liking. I got rid of the whole "Attachments" heading in mine.
    Beautiful solution, thanks very much! Any idea on how to make sure that this is constrained to the max size of the column for larger images?
  • You can use the Image Resizer addon, but I think it will need some tweaking to match the DOM structure of attached images. I'll take a look at it.

    The other alternative is to wait for the next release of FileUpload. Tim's said he's building this functionality into the addon and I'm sure it will be a lot nicer than my hack.
  • Another solution to the image viewing problem is to display the url of the image uploaded and use the magic plugin. will have to make this plugin be processed prior to magic but it might work.
  • The README file says "INSTALL PECL APC (Alternative PHP Cache)"
    Well, in order to install this, you must have your website hosted on a dedicated server because you have to use Secure Shell (SSH) access
  • 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.
    This is the exact same problem I'm having. How can I give them unique IDs?
  • i believe that problem has been fixed in newer versions of vanilla. what version are you running?
  • My config.php file says version 2.0.9
  • TimTim Operations Vanilla Staff
    That's the latest version. This issue has not been fixed in any stable release yet.

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

  • @jaseyboy you could put in

    < width=100%/>
    in the img-code - then the image will at least not be broader than the blue border.

    It doesn't work with MaxImageSize-plugin for me.

    @ruifelipe thanks, your changes work well for me!

    @Tim I can't yet use my locale.php with this plugin but have to customize it in the plugin's files themselves. Maybe that's something else to improve for the next version?
  • TimTim Operations Vanilla Staff
    @basb good point, I just did that.

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

  • Is there a definite way to attach an image to your comment using thickbox or similar
  • Ive issue with version 1.1. I'm using vanilla forum version 2.0.9. this is the scenario

    1. type in my comments then attach a file, attach file successful.
    2. When i want to post my comment, after posted the comment the attached file does not upload. It did not store into the database. even those old uploaded files doesn't work either. I cant download old files. When i go to /discussion/download/'mediaid'/filename, it seems to be blank page....no download popup windows at all.

    Help....in trouble now :(
  • I'm using rc3, which is the only version of Vanilla I was able to get working on my server. I receive the following error when trying to install the latest version of FileUpload:

    FATAL ERROR IN: PHP.Gdn_ErrorHandler();

    "FileUpload requires the Vanilla application version 2.0.9"
    LOCATION: D:\Inetpub\sarahsinn\tap\library\core\functions.general.php
    > 364: );
    > 365: }
    > 366: }
    > 367: } else if ($RequiredVersion != '*' && $RequiredVersion != '') {
    >>> 368: throw new Exception(
    > 369: sprintf(
    > 370: T('%1$s requires the %2$s %3$s version %4$s'),
    > 371: $ItemName,
    > 372: $RequiredItemName,
    BACKTRACE:
    [D:\Inetpub\sarahsinn\tap\library\core\class.pluginmanager.php 413] PHP::CheckRequirements();
    [D:\Inetpub\sarahsinn\tap\applications\dashboard\controllers\class.settingscontroller.php 499] Gdn_PluginManager->TestPlugin();
    [D:\Inetpub\sarahsinn\tap\library\core\class.dispatcher.php 270] SettingsController->TestAddon();
    [D:\Inetpub\sarahsinn\tap\index.php 39] Gdn_Dispatcher->Dispatch();

    I attempted to change the version number to 2.0.9 in the index.php file, but this didn't seem to have any effect whatsoever. Am I using an incompatible version of vanilla? I never really understood what the rc versions were anyway.

    Thanks,
    Chris

  • So, I installed PHP-APC using apt-get on my ubuntu server, but I still do not get my realtime progress bars. What could possibly be the issue?
  • TimTim Operations Vanilla Staff
    FileUpload 1.1 is old, would you mind continuing your discussion in the new release thread? I'll answer your question there.

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

  • TimTim Operations Vanilla Staff
    I'm using rc3, which is the only version of Vanilla I was able to get working on my server. I receive the following error when trying to install the latest version of FileUpload:

    FATAL ERROR IN: PHP.Gdn_ErrorHandler();

    "FileUpload requires the Vanilla application version 2.0.9"
    LOCATION: D:\Inetpub\sarahsinn\tap\library\core\functions.general.php
    > 364: );
    > 365: }
    > 366: }
    > 367: } else if ($RequiredVersion != '*' && $RequiredVersion != '') {
    >>> 368: throw new Exception(
    > 369: sprintf(
    > 370: T('%1$s requires the %2$s %3$s version %4$s'),
    > 371: $ItemName,
    > 372: $RequiredItemName,
    BACKTRACE:
    [D:\Inetpub\sarahsinn\tap\library\core\class.pluginmanager.php 413] PHP::CheckRequirements();
    [D:\Inetpub\sarahsinn\tap\applications\dashboard\controllers\class.settingscontroller.php 499] Gdn_PluginManager->TestPlugin();
    [D:\Inetpub\sarahsinn\tap\library\core\class.dispatcher.php 270] SettingsController->TestAddon();
    [D:\Inetpub\sarahsinn\tap\index.php 39] Gdn_Dispatcher->Dispatch();

    I attempted to change the version number to 2.0.9 in the index.php file, but this didn't seem to have any effect whatsoever. Am I using an incompatible version of vanilla? I never really understood what the rc versions were anyway.

    Thanks,
    Chris

    RC3 is definitely incompatible with FileUpload. You'll need to upgrade.

    RC means "Release Candidate" ... its a version before we even release vanilla 2.0, and we're already at 2.0.14. Please upgrade ;)

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

  • TimTim Operations Vanilla Staff
    Ive issue with version 1.1. I'm using vanilla forum version 2.0.9. this is the scenario

    1. type in my comments then attach a file, attach file successful.
    2. When i want to post my comment, after posted the comment the attached file does not upload. It did not store into the database. even those old uploaded files doesn't work either. I cant download old files. When i go to /discussion/download/'mediaid'/filename, it seems to be blank page....no download popup windows at all.

    Help....in trouble now :(
    Not sure what could cause this. Try turning on real errors by going to your config file
    /conf/config.php

    Change this setting:
    $Configuration['Garden']['Errors']['MasterView']

    To this value:
    'deverror.master.php'

    Try doing those actions again and see if you get errors. Another thing you could try is UPDATING to the latest FileUpload and Vanilla. I fix errors daily :)

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

  • TimTim Operations Vanilla Staff
    So, I installed PHP-APC using apt-get on my ubuntu server, but I still do not get my realtime progress bars. What could possibly be the issue?
    I think I know what you've missed. If you check out this tutorial:
    http://www.haughin.com/2007/10/23/php-upload-progress-with-php-52-apc/

    The important parts that you might not have done are:
    Now it’s time to enable this hidden upload progress gem….
    edit your /etc/php.ini file and add this line to the bottom:

    apc.rfc1867 = on

    All done? – Great… now we can start playing with the code.

    Restart Apache

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

  • So, I installed PHP-APC using apt-get on my ubuntu server, but I still do not get my realtime progress bars. What could possibly be the issue?
    I think I know what you've missed. If you check out this tutorial:
    http://www.haughin.com/2007/10/23/php-upload-progress-with-php-52-apc/

    The important parts that you might not have done are:
    Now it’s time to enable this hidden upload progress gem….
    edit your /etc/php.ini file and add this line to the bottom:

    apc.rfc1867 = on

    All done? – Great… now we can start playing with the code.

    Restart Apache
    Thanks Tim, that did the job. Never try to get something working at 4 in the morning when you had too much soda.
This discussion has been closed.